first local Wordpress site running perfect on WAMP, but following the same instructions for second site makes it redirect to public URL..[RESOLVED]
Hello everyone,
I have recently started using WAMP to see if I can get along with it and update my blog from a local environment instead of live, which would be a lot easier for me, especially considering I do a lot of flying for work, which currently eats into valuable time for updating my blog or updating clients' websites.
I use wordpress for my blog and all other sites and found a good guide on their codex ( [
codex.wordpress.org] ), that linked to this guide I used for the setup: ( [
weblogtoolscollection.com] )
Essentially, I follwed these steps to get my first website (blog) working:
• turn off skype (as it uses post 80),
• install wamp, not changing default settings,
• launch wamp.
• click wamp in taskbar, go to php and click php.ini.
• change upload_max_filesize and post_max_size to 1000, save file and restart computer.
• copy back up of public_html in the www folder (in my case it was C:/wamp/www/blog)
• create database in localhost/phpmyadmin with the same name as database in public wordpress site (found in wp-config.php).
• select database, import the back up .sql file.
• in wp_options table find siteurl (page1) and home (page 2) change url to [
localhost] and click go.
• create new user with same name and password as wp-config.php & ADD user to correct database after creation.
• switch on apache rewrite_module and restart, delete .htaccess and go to your localhost/blog/wp-admin Wordpress dashboard. change permalink settings to default and change back to what you had (to create new .htaccess file, because just enabling rewrite did not create a new .htaccess for me, this did ).
• Done.
This worked like a dream, I can access/navigate and edit my blog locally.
Then I added the second site, which is a Wordpres Multisite, I followed the same tutorial and changed the same settings in it's own corresponding database and wp-config.
This site is located in C:/wamp/www/driverszone. on going to localhost, I clicked driverszone under Projects, which it's alt tag correctly displayed: localhost/driverszone , yet re-directed to [
www.driverszone.co.uk]. this was at the point where I had deleted the .htaccess file and wanted to log into the wordpress dashboard by going to localhost/driverszone/wp-admin and change the permalink structure.
I did some more research and have since tried these possible solutions to no avail:
• put the old .htaccess back in
• deleted old .htaccess again and copied in my blog's htaccess - changing the url in the file to /driverszone instead of /blog
• found this guide [
www.infinitedesigns.org] and followed it's instructions
• added this in my hosts file:
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
127.0.0.1 blog
127.0.0.1 driverszone
•uncommented Include conf/extra/httpd-vhosts.conf in C:\wamp\bin\apache\Apache2.2.17\conf
• browsed to C:\wamp\bin\apache\Apache2.2.17\conf\extras\httpd-vhosts.conf deleted the examples and added in:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.mafgirl.com
ServerAlias mafgirl.com
DocumentRoot C:/wamp/www/blog
ErrorLog "C:/wamp/www/blog/logs/error.log"
CustomLog "C:/wamp/www/blog/logs/access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerName www.driverszone.co.uk
ServerAlias driverszone.co.uk
DocumentRoot C:/wamp/www/driverszone
ErrorLog "C:/wamp/www/driverszone/logs/error.log"
CustomLog "C:/wamp/www/driverszone/logs/access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "c:/wamp/www"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>
- I did also try to add <directory>, but no change and as this tutorial was telling me that if my files were located in the wamp/www folder I could omit the <directory> parts, I omitted it.
• restarted apache - when the driverszone Projects link was still redirecting to www.driverszone.co.uk, I restarted the computer
• still the same, so I deleted the whole driverszone directory and started again, but no change
• looking back to the first guide's comments and suggestions of other users, I also tried adding this to my wp-config.php
define(‘WP_HOME’, ‘localhost’ );
define(‘WP_SITEURL’, ‘localhost’);
and when that didnt work
define(‘WP_HOME’, ‘[
localhost]‘ );
define(‘WP_SITEURL’, ‘[
localhost]‘);
• Googled the problem, and read countless of forums, including many topics on this forum, but could not find anything I had not tried yet, although I could be using the wrong keywords
All the while, my first site is still working and my second is still redirecting to the public URL. I am using WAMP server 2.1 on a Windows 7 6bit machine.. has anyone got any idea where I am going wrong?
Thanks ever so much for your help
[
www.mafgirl.com]
Edited 1 time(s). Last edit at 06/07/2011 08:14PM by mafgirl.