I am using WordPress MU for a project that I am working on right now and I have run into and found a solution to a problem that seems to be plaguing the blogsphere. The sad thing is that the solution was already posted in the MU forums, but not given the proper attention. I am here to fix that.
Problem Description
When installing WPMU, if the installation is not completed because of a database issue, an endless loop will occur. This happens because the DB is not populated with the correct information, but the wp-config.php has already been written. Every time you hit the index.php, it tries to look at the DB and notices that the information is not there. Default behavior seems to be to try again, which has the same behavior as the first time through. Endless loop, here we come.
Yeah, I know it is more complicated than that. I am trying to keep it simple.
To be truthful, this was my fault for not having my DB permissions set up correctly during install.
The Fix
The simple way to resolve the issue is to rename or delete the wp-config.php that was generated during the first install. After this is done, reload the site and go through the install again. Make sure you have corrected the DB problem before you go through the install again.
The Bitch
While it was my fault that I had the DB permissions jacked up, the WPMU installer needs to be tweaked a bit to avoid this issue. If the DB stuff fails, we should probably avoid writing the wp-config.php with information that isn’t going to do a whole lot of good and will probably scare off someone that isn’t as determined as I am.
This is the part where I get comments and emails telling me to fix it if I am that worried about it. This is also the part where I tell you that I am not a programmer. I am an admin and an enthusiast. If I could fix it, I would damn well do it.
This is also the part where I explain that this isn’t a gripe against WordPress MU or WordPress in general. They are great tools. I am just trying to help someone that might be having the same problem I had.
Ok. That’s all. Go about your business.
Thanks man… the fix was so simple. I have been searching for the fix for 2 days.. You saved me man..
No problem dude. Glad I was able to be of help.
Thanks Bro for this info… now my WPMU is on.
Thanks! This post was a life saver. The install script should definitely throw an error if the db tables are not created!
Dude….this is the single most useful post on MU. Not sure why it does not get more press. Thanks bunches.
I am glad to have been of some help. Now to learn php so that I can actually fix these little problems when I see them.
Thanks , I had my head spinning around with this problem.
“Make sure you have corrected the DB problem before you go through the install again.” Didn’t even manage to do that. I made sure the database user had all permissions but still the loop.
Adding my voice to the chorus of THANK YOUs!
Glad I could help Ben.
Peter, go ahead and manually create your wp-config.php from the sample. All you should have to do is enter your DB information in wp-config-sample.php and then rename it to wp-config.php. The install should bypass the DB BS if you do.
Wow!!!!!
Gr8!!!!
It solved my problem…
Many Thanks…
After many – many searches, finally found this and its superb solving the problem.
Thank you very much.
Hi, Brad:
Could you elaborate on what the “DB problem” is?
When I created my DB in phpMyAdmin I made sure to grant All privileges and I’ve still have had no luck installing WPMU on my local machine (using MAMP).
I either get a dbase connection error or “WPMU only works without the port number in the URL.”
The dbase created for WPMU has no tables (0). Is it supposed to have some?
Thanks!
mc
That was really helpful. Thanks!
Melton,
This issue can occur with any DB issue where the setup script is not able to write to the DB. The reason doesn’t matter as much with the exception of fixing the problem.
With what you are saying though, it sounds like you are having issues connecting rather than permissions issues.
As for creating any tables for WPMU, the script should do them all if it is able to connect to the DB server, open the DB, and has permissions to write to the DB. (Tables, rows, etc…)
You don’t need to give the user DB creation rights if you have created the DB already.
I would double check that you have your DB permissions set to allow external connections. (Look at the users that have the % in the hostname and use them as an example of setting up the hostname within your user permissions.
Please let us know if you get this working and if I was of any help in this response.
Bradley,
I am having a problem with an installation loop that keeps referring me back to the install page. Is this the same problem you were having? The backend of my install works fine but the frontend of every MU blog is that same welcome/setup/install page!
See an example here: http://hunterdon-county.bestofnj.com/blogs/
John
Brad Thanks a lot that was a saver…
Jerry
Many thanks, I always do something like forget to fill a field in somewhere, first time forgot to change to my DB name and left default in place; did have enough sense to check config and manually update to correct DB name but never occurred that this redirect loop was because of empty tables. I did see a thread mentioning lack of tables as the issue but it didn’t really explain it in a way that was clear.
Thanks for explaining with clarity.
I found a great tutorial to get WPMU working correctly on MAMP. I was bashing my head on the keyboard for hours until I found it:
http://net.tutsplus.com/tutorials/wordpress/how-to-set-up-a-killer-wordpress-testing-environment-locally/
Lots of little tricky things like editing your hostfile and others to get it to work correctly! Hope it helps.
Thanks for the solution, worked for me. Though it happened again with the new installation and the permanent solution which worked for me is increasing the script execution time form 30s in PHP.ini
hope it helps someone
ta much for the tip! all I did was rename the wp-config.php file then start the sign up again and it worked….
I think I just encountered this problem myself. Actually a tech from HG recommended that I take a look here. OK back to work
Found out your site via live search the other day and absolutely love it. Carry on this fantastic work.
Although this post was up two years ago, but a big thank you for brad because you really solved my issues! LOVES!!!