How to Install WordPress on Your Windows VPS Manually

I have always been a .NET guy but the wordpress, being not just a blogging service but a whole infrastructure to build all kinds of websites, has got my attention lately. Thus, I have dedicated my sunday to a) installing WordPress, then b)installing a custom theme on it and finally c)publishing the website. All done on a Windows VPS that is completely managed by me.

This post will be about installing the WordPress on a Windows VPS. (Windows Server 2008 R2)
Here are the steps I followed:
1) Download and install WAMP Server (http://www.wampserver.com/en/)
WAMP Server is a bundle of Apache Server, MySQL Database and PHP for windows.
Be careful: If you have ISS working on the same VPS to serve some .NET site(s) as in my case, then you should change the listening port for WAMP server from default port value of 80 to something else, like 81. If you don't, you may not be able to get the WAMP up and running.
To change the listening port click the wamp icon and navigate to “httpd.conf” file. Click to open it.
Go to the line that says “Listen 80” and change it to “Listen 81”.
Now navigate to http://localhost:81. You should be seeing the server configuration page. Remember, this port changing part is for those of you who have ISS running on the same VPS. Otherwise just navigate to http://localhost and it should be fine.
2) Now create a directory under “C:wampwww” for your wordpress code files. (Assuming you used the default installation directory for wamp)
3) Download WordPress code (http://wordpress.org/)
4) Extract and copy the files into the directory you created in step 2. Let's say “mysite” directory.
Now it is time to create a MySQL database for WordPress.
5) Browse to http://localhost:81 to open the server configuration page, click phpMyAdmin.
Note: Default user: root, Default password: (empty). If this doesn't work try “root” for both username and password.
6) Create a new database (You can set a specific collation for your language here)
Note: Give your DB a name that is hard to guess for attackers. Note the DB name.
7) Click your newly created database in the databases list on the left pane of phpMyAdmin console, then click “Privileges” on the top menu of the right pane.
8) Click “Add user” link in the main pane to open the “Add user” page
Enter the login information, select “Local” for the “Host” value and make sure to “Check All” the Global privileges and click “Go” on the bottom right. Note the username and password.
9) Go to “C:wampwwwmysite” and rename the file “wp-config-sample.php” to “wp-config.php”. This file contains the configuration for your WordPress installation.
10) Open wp-config.php with notepad.
Find the lines saying “MySQL database username”, “MySQL database password”, “The name of the database for wordpress” and enter the values you noted for db name, username and password.
Enter DB_CHARSET and DB_COLLATE values for your database if you have set specific values for your language. Otherwise leave them unchanged.
11) Go to the “Authentication Unique Keys and Salts” section right below¬†DB_CHARSET and DB_COLLATE lines. You will see a group of keys and salts. Now we will get their values using the wordpress API. Open a browser and go to:
Now replace the place holder values in wp-config.php with the values you get.
12) Change the default “$table_prefix” value to some other value that is hard to guess. Just don't leave it as default and leave your site vulnerable to attacks.
13) Save wp-config.php file. Make sure you have no typos and all the info you entered is correct!
14) Navigate to http://localhost:81/mysite. You should see the WordPress installation page. Fill in the required fields and click Install.

That is it!

Hope this helps someone.

Good luck,
Serdar.

Leave a Reply

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