Verified and Tested 08/17/15
This how-to will show you how to install WordPress on CentOS 6.7. WordPress started as a blogging system, but now has become a full content management system (CMS). Since WordPress is a free open source program, it has become the most popular CMS on the Web. With thousands of plugins, your website is nearly limitless.
– If you do not have a CentOS 6.7 server, get a reliable cloud server from Atlantic.Net
Install WordPress on CentOS 6.7
To install WordPress, we are going to start off by setting up the database by running the following commands:
mysql -u root -p
When prompted, enter your MySQL root password that you set up when installing MySQL.
In MySQL, enter the following commands:
create database wordpress character set utf8 collate utf8_bin;
Make sure you set your own secure password where it says [insert-password-here]
grant all privileges on wordpress.* to [email protected] identified by '[insert-password-here]';
Now that the database is created, we can download the latest version of WordPress with the following command:
Note: if wget is not installed, install it by running the command:
yum install wget
The latest package will download to the directory you are currently in, with the file name latest.tar.gz. We need to decompress the file by running:
tar -xzvf latest.tar.gz
Next, we need to copy wp-config-sample.php to wp-config.php which is where WordPress gets its base configuration. To do that run:
cp wordpress/wp-config-sample.php wordpress/wp-config.php
In your favorite text editor, edit wordpress/wp-config.php
For a basic setup, we need to have the following.
It should look like this when completed:
Next, we need to move the WordPress folder to your web directory.
sudo cp -r ~/wordpress/* /var/www/html
We now can go to the WordPress web installation. In your browser go to http://yourhostname-or-ipaddress
If you are unsure what you IP address is run the following:
In our example, we would put http://18.104.22.168/ in the address bar and get the following page.
From here all that is needed to do is to follow along with the WordPress install and give the information required.For more information, you may want to check out the WordPress Codex.