A VPS or Dedicated Server running CentOS On CrownPanel
Putty or similar client to login to your VPS.
Log into MySQL with the following command,
mysql -u root -p
Enter the password for the root account you set when you installed MySQL.
First, we'll create a new database,
CREATE DATABASE wordpress;
Next, create a new MySQL user account that we will use to operate on WordPress's new database, with username "wordpressuser"
CREATE USER wordpressuser@localhost IDENTIFIED BY 'password';
Link the user and DB together by granting our user access to the database,
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';
Flush the privileges so that MySQL knows about the user permissions we just added,
Exit out of the MySQL command prompt by typing:
Install PHP, Apache and PHP-GD,
yum install httpd php php-mysql php-gd
Now we need to restart Apache so that it recognizes PHP:
service httpd restart
Download the latest version of wordpress,
cd ~ wget http://wordpress.org/latest.tar.gz
Extract the archived files to rebuild the WordPress directory,
tar xzvf latest.tar.gz
Move the unpacked files to Apache's document root,
mv /root/wordpress/ /var/www/html/
Create directory for uploads,
Use chown to grant ownership to Apache's user and group:
sudo chown -R apache:apache /var/www/html/*
Begin by moving into the Apache root directory where you installed WordPress:
The main configuration file that WordPress relies on is called wp-config.php.
cp wp-config-sample.php wp-config.php
Now that we have a configuration file to work with, let's open it in a text editor:
The only changes we need to make to this file are under the section titled MySQL settings and change the DB_NAME, DB_USER, and DB_PASSWORD variables.
Fill in the values of these parameters with the information for the database that you created. It should look like this, Please remember to change "password" to the password you setup above,
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'wordpress'); /** MySQL database username */ define('DB_USER', 'wordpressuser'); /** MySQL database password */ define('DB_PASSWORD', 'password');
These are the only values that you need to change, so save and close the file when you are finished.
You'll need to complete the WordPress installation through the web interface, Visit the following URL, replace server_domain_name_or_IP_Address with your VPS IP or domain name and follow the instructions on screen,