Recently, I upgraded my WordPress blog to the latest version — with very low stress. One of the main reason for this was the preparation and testing I did on my local PC test bed. This article describes how I installed both a test bed and WordPress on my local PC.
On my local PC, I had previously installed Apache, mySQL, and PHP. My original installation was through open source and individual packages: I installed each of these components individually. However, there is a better and quicker way for those wishing to install their own WordPress test bed — WampServer.
The present components of this integrated, easy to install package are these:
- Apache 2.2.11
- Apache MySQL 5.1.30
- PHP 5.2.8
I decided to give the latest version, WampServer 2, a try-out on my local PC and to test the ease of installing WordPress after WampServer was operational. I’ll give you a clue right now of how I like WampServer after my testing — it’s wonderful.
I am not going to bother with lots of detail about the installation because the installer is just plain bulletproof: except for electing to create Desktop and Quick-Launch icons, I accepted all of the defaults for an easy install.
When the installation was completed, the installer placed a new icon in the system tray. If the icon is not present after system startup, clicking either the quick-start or desktop icon will place it there. Left clicking the icon displays the WampServer menu.
The very first menu item is a toggle for placing the server online or offline. I keep this set to the offline (default) mode because I only want to access WampServer from my local PC.
At this point, a click on the “Localhost” menu item will bring up the very first, and very useful, WampServer HTML page.
My next step was to set a password for the mySQL server. Unless this is done, the server is a security risk. Clicking the phpMyAdmin menu item brought up phpMyAdmin. Initially, there were two information messages at the bottom of the page. One message warned that the password had not been set. The other message about the PHP mySQL library version can be safely ignored.
From the phpMyAdmin screen,I selected the Privileges tab, clicked the “Edit Privileges” icon for “root,” entered a password, and clicked the “Go” button. This assigned the password to the root user. One more step needed to be completed to eliminate a nasty-looking error message.
I opened the phpMyAdmin configuration file at C:/wamp/apps/phpmyadmin3.1.1/config.inc.php (for my installation). I used my favorite text editor to add the root password to the file.
In preparation for WordPress, I activated one additional Apache module. From the quick-start menu, I selected Apache/Apache modules/ and checked the rewrite_module. You may have to “Start All Services” for this to take effect. When the module has been activated, a check mark will be in front of the option. The rewrite_module is needed for “pretty URLs,” otherwise known as permalinks. For my WordPress sites, I configure permalinks for /%postname%/.
WordPress needs a mySQL database to store blog data. I opened phpMyAdmin , entered a database name of “wordpress,” and clicked the “Create” button. That’s it! WordPress will fill in the tables it needs.
Next, I downloaded the latest version of WordPress and unzipped the file into the C:/wamp/www directory. All web pages get placed in this root directory. In fact, the default home page for WampServer is reached through the index.php file that is already there.
Before running the WordPress installer, the wp-config.php file needed to be created and modified in order to tell WordPress how to access the database. See the first reference at the end of this article for how to create and configure the file.
Once the wp-config.php file had been modified, the installation could begin. I browsed to the wordpress directory, hit the “Enter” key, and the installation began.
After the installation, WordPress was up and running.
To help keep my test bed private, I installed a plugin called “Maintenance Mode.” The plugin enables me to display a web page to anyone browsing to the WordPress test site. I configured the page to display the message, “This Site is Permanently Offline.” The page does allow the administrator to log in, manage, and view the blog.
Installing a WampServer test bed on your local PC can save you loads of time by enabling you to test your WordPress installation, including plugins, and your (X)HTML pages — before putting them online. After WordPress is installed on the test bed, and depending on what plugins you install, other Apache modules might have to be activated. By using the WampServer menu, it is easy to do this.
— A comprehensive tutorial on installing and styling WordPress.
— If you want to access WordPress from the root directory (instead of the “wordpress” directory), this article shows what to do.