Support » Localhost Installs » Multiple local installs of wordpress under wampserver

  • Resolved Pvteyez


    After a week of beating my head against the keyboard I finally figured it out so I’ll share and hopefully save someone else from a few lumps on the head!
    After 25 years as a professional programmer I decided to do a new project in wordpress to see how it works.
    I downloaded wampserver from their site (since it wouldn’t work with Microsoft IIS) and got that up and running. I stalled WordPress in a folder under wamp/www on my local machine and installed it. Imported my database from the production site and finally got it working so I could work on it locally. All was good.
    I recently took a contract for another site and figured I’d do that in wordpress too. I set it up on the host (GoDaddy) and then ftp’d the database down to a local backup and tried to install WordPress again in a new folder under the localhost/www folder. That started a nightmare.
    A week later I woke up and swore I would not sleep until I figured it out. I had already screwed up both local copies of the sites. Here’s what worked for me. (and yes, I have backups of both)
    After uninstalling wampserver and deleteing all the folders attached to it I started with a fresh install on wampserver. This was probably overkill, but I was seriously frustrated!
    Now I go to phpMyAdmin from wampserver and create a new database named “wordpress” . I created a new user for that database with the user name “admin” and a password “xxxxxxx”. To create the new database through phpMyAdmin, I used the create new database function but instead of leaving the Server Connection collation box at the default collation, I selected utf8_general_ci from the drop down. That allowed me to create an empty database named wordpress. Now I downloaded and unzipped a clean set of WordPress files into that new folder wamp/www/Website_name. I tried just opening the install.php file in the wp-admin folder and got a “php not running” error. After some trial and error and google research I brought up a browser and typed in “localhost/Website name/wp-admin/install.php” (Make sure your wampserver is online when you do this) I had to stop my Microsoft IIS before it would come online.
    THAT finally brought up the install application for WordPress. Once again I got an error! I looked again and renamed the wp-config-sample.php in the root folder for my site to wp-config.php and then edited it in notepad to change the database name to wordpress and the user and password entries to match the wordpress database I had created in phpMyAdmin.
    I went back to my browser and again entered localhost/website name/wp-admin/install.php and YAY! It worked.
    With my original site back, I went to do additional installs in new folders under the wamp/www folder. In each case I followed the exact same steps EXCEPT when I created the new database for the new installation I used a new database name (of course). Then before running the install.php, I edited the wp-config.php to reflect the new database name. I kept the same user name and password for simplicity but I did have to change the “table_prefix” for each new instance of wordpress to something other than the default “wp_”. In my case, each new instance of wordpress has it’s own database. In the original the tables have the wp_ prefix, in the subsequent installations the table prefixes in those databases are wpDDD_ and wpMS_ respectively.
    I haven’t yet tackled how this will impact importing and exporting from the production databases to the local ones since all the production sites are using the wp_ table prefix but my local copies have their individual prefixes. One thing at a time!
    But this is how I got the multiple installs of wordpress to work locally. Whatever site I am working on I log into word press with my same user name (admin) and the same password.

  • The topic ‘Multiple local installs of wordpress under wampserver’ is closed to new replies.