How to Install WordPress on CentOS

Before installing WordPress, the server needs to have  LAMP or LEMP installed.

how to install wordpress on centos

Steps to install WordPress on CentOS

Download WordPress

Go to the folder containing the website content

cd /usr/share/nginx/html/
wget http://wordpress.org/latest.tar.gz

Decompression

tar -xzvf latest.tar.gz

Create WordPress MySQL Database và User

See instructions for operating the database using the command line . For example, create a database_name database  , user  database_username with password  database_password  to use.

Install WordPress

Tạo file wp-config.php

cp ./wordpress/wp-config-sample.php ./wordpress/wp-config.php

Edit the file

sudo nano ./wordpress/wp-config.php

Fill in the database, user, and password information

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name');

/** MySQL database username */
define('DB_USER', 'database_username');

/** MySQL database password */
define('DB_PASSWORD', 'database_password');

Save and exit.

Move all files in wordpress folder out

mv -f ./wordpress/* ./

Change the ownership folder containing WordPress

sudo chown nginx:nginx * -R

Now you can proceed to install WordPress by going to http://site.com/wp-admin/install.php and then.

About us: admin

Leave a Reply

Your email address will not be published. Required fields are marked *