Sunday, May 18, 2014

Setup WordPress on NGINX



Installation procedure of WordPress:

Installing wordpress in NGINX is a little bit tricky. You have to do some little tweaks to work wordpress perfectly in NGINX server. In this tutorial, I'll show you how to install wordpress without having additional problem. Let's start.


Preparing wordpress installation files on server:

1. Follow this tutorial to create a new host/domain for your wordpress site. Note username & password anywhere else
2. Log in your server by your preferred SSH client with this username and password. DON'T login as root, you will face permission errors.
3. Go to public_html folder
cd ~/public_html
4. Dowload wordpress in your server
wget wordpress.org/latest.tar.gz
5. Extract the downloaded package

tar -xzvf latest.tar.gz
6. Copy all the extracted file from wordpress directory to public_html folder
cp -Rf wordpress/* ./
7. Remove the empty wordpress folder
rm wordpress

Installing Wordpress:

1. Now go to your domain (which was created in step 1)
2. Click "let's go".
3. Now, follow the below steps carefully. You'll get these information from step 1.
a. In database name field, give your virtual host username. Username and database name is same.
b. Username of your virtual host
c. Password of the username.
d. Database host: localhost
e. Table Prefix: wp_
You can change table prefix to anything else (example: test_, mywp_, blabla_ etc). It's a good practice for security reason.
4. Click "Submit"

If everything goes well, you will see a page started with "All right sparky!...." Click "Run the install". In the next page, give necessary information about your site & click "Install Wordpress". Installation will be started. After that, you will be asked to enter username and password which you selected for your wordpress site in the previous page.

Wordpress installation is complete. 

No comments:

Post a Comment