What led to this:
In February of 2012, I had two wordpress sites, built with the techozoic theme, which were broken for a variety of reasons, including a backlevel of techozoic and an importbuddy done without first deleting the files.
What I decided to do about it:
I thought that a good remedy would be to set up a WAMP environment for the purposes of debugging, and so that in the future, I would have a test server (also known as a staging server.)
Because I want to ultimately have two websites in WAMP, I will run a single install of Apache, MYSQL and PHP and then I will set up two different instances of my wordpress install. This set of instructions covers mikemoran, and assumes that you will follow the same steps for biznology.
For more information:
See this website: http://sixrevisions.com/web-
The specs:
(It’s important that the PHP versions be as close as possible to that of the live server, but especially the PHP version in WAMP should not be far behind that of the production server. The WordPress versions must match exactly. The Apache and Mysql should be as close as possible.)
- WordPress 3.3.1 in both
- PHP 5.2.17 in Production, PHP 5.3.9 in WAMP
- Apache 2.2.21 in both
- Mysql 5.1.56 in production, 5.5.20 in WAMP
Starting on Valentine’s Day, 2012, I set out on these steps to rebuild my mikemoran.com site in WAMP. These instructions developed and morphed over time. This post serves as documentation for myself of what I did. If it helps someone else, that’s great.
- Set up WAMP
- Note in advance that Secunia will probably flag elements of WAMPSERVER. It is not necessary to put the patches on unless you plan to use WAMP to support a live site.
- Download and install WAMPSERVER 2.2 in the default directory C:\wamp
- Point your browser at localhost http://localhost to see the default server configuration page.
- Create a directory for the mikemoran website files c:\wamp\www\mikemoran
- Go to localhost to see that mikemoran is listed under “projects.” Then go to http://localhost/mikemoran
- Repeat the two steps above for biznolgy
- Install WordPress in each folder (repeat steps below for each website)
- Download the latest WordPress zip file, and extract it contents into the mikemoran subdirectory of www. so that the wordpress files land in the mikemoran root.
- Visit http://localhost, then under Aliases,click on phpmyadmin to create a database. Use the same name as that on the production server.
- Visit http://localhost/mikemoran/wordpress to start the WordPress install.
- When it says you have no config file, then click on the button that says “Create a configuration file.” You will be able to match it to the server later.
- When you get to the database screen, set the database name, set the MySQL username to root, and don’t set a password. Leave the other defaults. Click “submit.” Be careful about your database prefixes.
- Click “Run the install.” Put in the site title and the same wordpress usernames and password as that on the production server.
- Click “install wordpress”
- Go back to phpMyAdmin to check for the presence of your database tables
- Set PHP Config settings to be exactly what you have on the live production site (in php.ini). If you can’t see the contents of the php.ini file directly on the server, then you can run this php file:
<?php phpinfo(); ?>
Then navigate to that file in your web browser, and you will see the needed information. The instructions I found said that the most important thing is to make sure that safe_mode is set, and magic_quotes_gpc is set. I found them to be set to off on my live server, so I left them off in my WAMP installation. To compare it to the WAMP php, click on the WAMP icon, click on “localhost” and then click “phpinfo” which is under the Tools category. - If you see from the php.ini file that you have a different PHP version on the live server than you do on WAMP, then change your wampserver PHP to match the one on the server, but at worst, it really ought to be at least PHP 5 on the server! I left wampserver at 5.3.1.0, while my live site is 5.2.1.7 (for both site).
- To get pretty URL’s, enable mod_rewrite: click on the WampServer icon in the taskbar, mouse over Apache and then Apache modules. Find rewrite_module in the list and click it. You will need to then click Restart all services to start using mod_rewrite.
- Create a MySQL user with the same details as our live server’s WordPress MySQL user. To do this, browse to http://localhost/phpmyadmin again and click on your WordPress database to select it (you only have one database so this should be easy).Next, click on the Privileges tab at the top of the screen, and then click Add a new User. Give the new user the same name and password as your live MySQL user. Use localhost. Click the Check All option at the bottom, which grants my new MySQL user all privileges. Click “go.”
- Configure the wordpress install: We will edit the WordPress config file (wp-config.php) to match the new database details.
Now we have a local website that has the same configuration as your live server. - Configure the wordpress admin pages. Open http://localhost/mikemoran/wordpress/wp-login.php. In settings–>general, change the URL’s to http://localhost/mikemoran.com. Scroll down all the settings in your wamp wordpress installation, and match them to the live server.
- Edit the apache config in WAMP to change the root pointer. There are two lines, one for root and one for directory.
- Install the latest version of techozoic
- Install all the plugins
- Copy the style file from the “custom css” plugin into the techozoic custom css.
- Create a zip file database backup from our current production site
- Backup the existing WAMP database
- Use importbuddy to import the backed up mikemoran database
- If there are errors, then remove the database and restore the backed up WAMP database. Then research how to pull in only the pages and posts.
NOW SANITY CHECK THAT YOU DID ALL OF THIS:
Password Setup
1. Set a password for root/localhost in PHPMyAdmin
2. Added the following code (after the colon) right above the Servers configuration section in the config.inc.php file: $cfg['blowfish_secret'] = ”;
3. I entered a passphrase between the ” in the above added code.
4. Changed the auth_type = cookie (Actual code: $cfg['Servers'][$i]['auth_type'] = ‘cookie’
5. Entered my new root password in the Password line between ”
6. Exiting and Restarting WAMP
7. Successfully logged into phpMyAdmin using new root password
Setup new Database
1. Added new User
2. Set database name = new user name
2. Able to login w/ new user and can only access/use the one database.
WordPress Install
1. Downloaded and unzipped WordPress
2. Moved the contents of the wordpress folder over to c:\wamp\www\mikemoran (since I plan on seting up multiple WP sites, I assume this is where I’ll need a separate unique folder for each WP site)
3. I type in [localhost] and I receive the Create config file message.
4. Edited wp-config-sample.php w/ notepad++
5. Rename to wp-config.php
6. Set the Database, Username, and Password all equal to the names setup above which are all the same name. NOTE: This means I am entering the new user here, not the ROOT User correct?
7. Saved file
8. Refreshed browser — WordPress installation page opened
9. Set Site Title = Domain Name
10. Set Username and Password
11. Set email
12. Set to allow in search engines
13. SUCCESS
14. Successfully logged in as admin
AND FINALLY, do this:
The Virtual Hosts setup:
1. Created the folder “logs” under c:\wamp\www\mikemoran
2. Created the folder “logs” under c:\wamp\www\biznology
3. Created the Log file folders for both of the above
4. Removed # from Include conf/extra/httpd-vhosts.conf (line 466) in httpd.conf file
5. Added
NameVirtualHost *:80
ServerName mikemoran.com
DocumentRoot C:/wamp/www/mikemoran
ErrorLog “C:/wamp/www/mikemoran/logs/error.log”
CustomLog “C:/wamp/www/mikemoran/logs/access.log” common
ServerName biznology.com
DocumentRoot C:/wamp/www/biznology
ErrorLog “C:/wamp/www/biznology/logs/error.log”
CustomLog “C:/wamp/www/biznology/logs/access.log” common
ServerName localhost
DocumentRoot C:/wamp/www
ErrorLog “C:/wamp/www/logs/error.log”
CustomLog “C:/wamp/www/logs/access.log” common
6. Update hosts file
127.0.0.1 localhost
127.0.0.1 mikemoran (.com?)
127.0.0.1 biznology (.com?)



Export – Download Export File