NOTE: You must have the LAMP stack installed before installing WordPress.
Create the WordPress database, user, and password
|mysql -u root -p|
Now, create the database and user for your WordPress installation. You can replace WPdatabase, WPuser, and WPpassword with your own database name, username, and password in the following commands:
|CREATE DATABASE wordpressdb;|
|CREATE USER [email protected] IDENTIFIED BY 'WPpassword';|
|GRANT ALL PRIVILEGES ON WPdatabase.* TO [email protected];|
Now, flush the privileges and restart the service:
Now, extract the compressed file to your home directory:
|tar -xzvf latest.tar.gz|
Begin by copying the sample config file into a new file:
|cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.php|
Now open the file in Nano so that it can be edited:
Once you have the wp-config.php file open in vi, go through it and replace wpdatabase, wpuser and dbpassword with the database name, username and password you created in the first step. Then save your changes and exit vi.
Move WordPress to the web root
Now that WordPress is configured, you will need to move the contents of the WordPress directory to your website's web root directory:
|sudo cp -r ~/wordpress/* /var/www/html|
If you have not already installed php-gd, you will need to do so for WordPress:
|sudo yum install php-gd|
|sudo service httpd restart|
Now complete the WordPress setup now located at http://yourdomain.com/wp-admin/install.php, where 'yourdomain.com' is replaced with your actual domain.