tags:

views:

29

answers:

1

I'm trying to setup the multisite feature for wordpress 3.0 on my Mac's localhost via MAMP.

When I follow all the instructions for turning on networking via subdirectory or subdomain, either way, I get

"Safari can’t open the page. Too many redirects occurred trying to open “http://localhost:80/”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page."

I've tried everything I could find on forums: -commenting out the define( 'DOMAIN_CURRENT_SITE', 'localhost:80' ); line -adding this line define('NOBLOGREDIRECT', 'http://localhost:80/'); to the wp-config file -adding define( 'SUNRISE', 'on' ); to the wp-config -tweaking the .htaccess file in various ways -changing configuration settings in MAMP -clearing cookies and the cache -adding define( 'SUNRISE', 'on' ); -I even reinstalled wp3.0 five different times and one of those times I took all the contents out of the wordpress folder and dumped them directly into the htdocs folder as one forum post said to do.

None of this has worked. I don't know if this is a quirk of using a Mac and using MAMP. Here is the base url for the site: http://localhost:80/ I've tried deleting out the :80 part in the url bar and it gets redirected back to (http://localhost:80/) Here is my Mamp Apache document root path: /Applications/MAMP/htdocs/ (I tried this with and without the trailing slash)

What am I doing wrong?

A: 

WordPress Multisite will not work with the port number in the URL (as stated in wp-includes/ms-setting.php).

You'll have much better success if you set up an Apache VirtualHost, for example;

<VirtualHost *:80>
    DocumentRoot "/path/to/wordpress"
    ServerName wordpress.dev
</VirtualHost>

You'll need to edit the HOSTS file to point wordpress.dev to 127.0.0.1 (your local IP address).

This means you can now use http://wordpress.dev in the address bar - since the server name is a standard domain format, WordPress MS shouldn't have any problems (this is exactly how I run my set-up).

TheDeadMedic
Thanks for your quick response, but this didn't help.
Dylan West
Ok, this did help a little bit. I forgot to change define( 'DOMAIN_CURRENT_SITE', 'localhost' ); todefine( 'DOMAIN_CURRENT_SITE', 'wordpress.dev' );And the redirect problems are gone. Now I'm getting this message:Error establishing database connection.I've tried changing several fields in the db to match wordpress.dev, but that doesn't work. I've even tried different entries for the db hostname in wp-config and none of them work, either. What can I do now?
Dylan West
Have you tried a fresh install under `wordpress.dev`?
TheDeadMedic
Not yet. I will try that next
Dylan West
I got it to work! I had to reinstall and set the database host name to wordpress.dev, too. Thanks for your help, TheDeadMedic.
Dylan West