Installing Wordpress

From Metro Studios Knowledgebase

Jump to: navigation, search

The following guide is a step-by-step guide to assist in the installation of WordPress:


Contents

[edit] Preparation

  1. Check the current requirements for wordpress: Wordpress Requirements
  2. Check the server for installed versions of MySQL and PHP to verify they meet the minimum requirements.
    1. Check MySQL version
      mysql -version
    2. Check PHP version
      php -v
  3. Download wordpress
    1. If minimum requirements are met: Wordpress Download
    2. If MySQL or PHP versions are older than required: Wordpress Release Archive

[edit] Database Setup

  1. Create a new database on the server. Typical file-naming convention is "clientname_wp".
  2. Create MySQL username and password for the client if one doesn't exist and grant privileges to the newly created database.
  3. Download wordpress

[edit] Installation (Server Side)

  1. Create the blog directory on the client's site (typically just DOMAIN.COM/blog/)
    • You'll want to add the /blog/wp-content/uploads/ directory to the .gitignore file to prevent indexing of files that can change within wordpress.
  2. Transfer wordpress .tar.gz file to the new directory using SSH
  3. Log on to the server using PuTTY
  4. Navigate to the newly created blog directory
    cd /var/www/vhosts/[CLIENT FOLDER]/httpdocs/blog
  5. Decompress the wordpress .tar.gz file
    tar -zxgv [wordpress.tar.gz] <!-- might actually be the folowing: tar -xvzf wordpress{VERSION NUMBER}.tar.gz -->
  6. Move the wordpress files out of the default "wordpress" directory
    sudo mv wordpress/* <!-- might actually be the folowing (from the site folder): mv httpdocs/wordpress/{.,}* httpdocs/ -->
  7. From the site's root directory, modify the permissions on the blog directory and it's files/sub directories
    sudo chmod -R 777 blog

[edit] Installation (Wordpress Quick Install)

  1. Visit http://www.DOMAIN.com/blog/ and start the WordPress Installation.
  2. Provide the Database name, Username, and Password we set up earlier.

[edit] Installation (Final Steps)

  1. Once the installation is done, the permissions need to be reset. From within the blog directory run the following coomands:
    Reset permissions for blog directory
    sudo chmod 775 .;
    Reset permissions for all sub-directories
    sudo find . -type d -exec chmod 0775 {} \;
    Reset permissions for all files withing blog directory
    sudo find . -type f -exec chmod 0764 {} \;
    Give ownership of the uploads folder to apache so media can be uploaded inside WP
    sudo chown -R apache:apache wp-content/uploads/;
  2. From the site's root directory -- add all the new files, commit, and push them:
    ==Permissions Commands==
    From within httpdocs:
    sudo find . -type d -exec setfacl -m d:u::rwx,d:g::rwx,d:o::r-x,d:g:git-users:rwx,g:git-users:rwx {} \;
    sudo find . -type f -exec setfacl -m u::rw-,g::rw-,g:git-users:rw-,o::r--,mask::rw- {} \;

    From within vhosts/site.com:

    sudo find httpdocs.git -type d -exec setfacl -m d:u::rwx,d:g::rwx,d:o::r-x,d:g:git-users:rwx,g:git-users:rwx {} \;
    sudo find httpdocs.git -type f -exec setfacl -m u::rw-,g::rw-,g:git-users:rw-,o::r--,mask::rw- {} \;
    sudo find httpdocs.git/hooks -type f -exec setfacl -m u::rwx,g::rwx,g:git-users:rwx,o::r-x,mask::rwx {} \;
Personal tools
Namespaces
Variants
Actions
Wiki Navigation
Knowledgebase
Toolbox