Can anyone please point me to specific step by step instructions of how to install muliple instances of WP pointed to one DB? I already have one WP blog installed on my server. I would like to create 2 more blogs. I would prefer to install seperate instances of WP as the network feature does not sound like what I need.
I am the only accessing the ADMIN dashboard for these blogs and the server is hosted directly by me… meaning I have hands on access to it.
Thanks for any help here.
All you need to do is edit the wp-confing.php file and make sure atht the value for:
$table_prefix = 'wp_';
is different for each installation. You can make
wp_anything that you want, just make it unique for each site. Then, you can proceed with the standard installation process.
I have seen instructions that say just that. However, there obviously is something missing as I have done just what you say.
Here is what I have done
1. Downloaded and unzipped the latest WordPress to my harddrive
2. Here is where there is a HUGE gap in the process. I have copied the existing wp-config.php and edited it so that $table_prefix = ‘wp_’; does indeed have a different prefix. The prefix I edited to is wpna_
3. I left everything else in the wp-config.php the same. Copied the file back to the newly unzipped files in the correct folder.
4. Called the wp-admin/install.php file from the browser. However, get the following error:
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at XXXXXX. This could mean your host’s database server is down. “XXXXX” being the current database name.
5. I have tried different Database Names in the wp-config.php file but continually get the same error.
What Database name is it looking for then if I am trying to use the same DB?
This is obviously not as simple as merely changing the $table_prefix
This means that your database details are not correct. I’d say that this means that you haven’t copied the wp-config.php file to where you think that you have. Double-check the file in the folder that it’s supposed to be in and see what it says. Remember, not your local file, but the file that’s actually on your web server.
The wp-config.php should be in the same folder as wp-confg-sample.php, correct? It is…
Yes it should be, and if you’re getting that error then it is in the right place. if the file wasn’t there you’d be getting a different error. What I said was that you need to check what is actually in the wp-config.php file. If it’s on the same server but just in a different directory and they both have the exact same database details there’s no reason why it shouldn’t work and you’d have to contact your hosting company to ask them why because we can’t diagnose isues like that.
As I stated at the beginning of this post:
I am the only one accessing the ADMIN dashboard for these blogs and the server is hosted directly by me… meaning I have hands on access to it.
I am the host of my server.
So again, what is not clear here are what the exact steps are to use the same DB for another blog on the same server.
If I copy the wp-config.php from the blog that is already running on my server and simply edit the $table_prefix to something unique, and copy to the the correct folder of the new blog, is that all that is sufficent. As that is what all the instruction say is only needed. My guess is that is not correct.
My guess is no which is why I am asking anyone if they can point me to step by step instructions of how to do this.
What you have raed. That is the only step that’s needed. I’ve done this a few times now, so I know that is how it’s done. If you can’t connect to your database, then the database connection details that you have in the wp-config.php file are wrong – it has nothing to do with the setting for the database prefix.
So, as I have stated, I copied the wp-config.php file from the existing working blog and edited the $table_prefix from wp_ to wpna_. Saved the file and copied back to the same folder in the new blog folder.
If the DB connection settings are wrong, how is the existing blog functioning?
I don’t know. You’re the one that’s adminsitering your systems, and I can’t see how they are set up. All I can tell you is what I have so far. Changing the prefix will not affect the database connection. If you can’t connect to the database, the database connection deatils are wrong. I don’t know why or how becaue I can’t see how your system is set up. As it’s your server, I’m sure that you can check out the error logs that are available from PHP, Apache and MySQL and get more information on this then we can. 🙂
I am the one administering my system. I already have a successful blog configured and running on my systems.
Let me try this differently.
Should I be able to copy the exising wp-config.php file from the existing blog folder, edit the $table_prefix as I have described, and copy it to the correct location of the new blog folder?
And I am not using Apache, it’s a Windows based server.
Yes you should. That is all that you should need to unless something else is wrong.
Sorry, but it’s worked for me a few times and it’s worked for a lot of other people. I can’t give you any more advice because what I’ve told you so far is what the problem normally is.
My only suggestion now is to copy the wp-config.php file without making any changes. If you do that and it works, then you’ll know that what ever I’ve said is wrong and you can then change the prefix and do the standard installation. If you do that and it doesn’t work, then you’ll know that it’s not an issue with the prefix and you’ll have to look at the way that your server is running rather then what you are doing with WordPress.
I tried your suggestion and now when I open wp-admin/install.php in a browser I get the following:
You appear to have already installed WordPress. To reinstall please clear your old database tables first.
This would indicate to me that there is no issue with the database connection details as I would suspect. The only change to the file that I have been making is the $table_prefix as I have stated and as the instructions have stated to do.
- The topic ‘How to install multiple WP instances to one DB’ is closed to new replies.