Okay, I've got a version of 3.1.3 that I want to clone to get a development environment. [Note the system has been running for a long time. This is a new requirement.]
2. change the $table_prefix in the database (with a SQL script in phpMyadmin -- e.g. "rename table wp_posts to dev_posts", etc.
3. In a new file-system installation, change the $table_prefix in the wp-config.php file from "wp_" to "dev_"
4. Import the database back (with the original prefix) (to get the original system running again).
However, I'm running into a problem reported before that trying to login as an administrator (and perhaps others) in the new system fails - with the messsage, "You do not have sufficient permissions to access this page."
Support post from 3 years ago:
has this script-
SET meta_key = REPLACE(meta_key,'old_','new_');
SET option_name = REPLACE(option_name,'old_','new_');
Support post from 4 years ago
has a link to
which enumerates the options to change:
And these are the options listed in Trac from 4 years ago (and closed as invalid though some folks disagree):
The script from 3 years ago doesn't look hard to implement, but I thought I'd check here to see if there's any downside (someone using "wp_" as a prefix string that is *not* related to the $table_prefix value, for instance.)
The only ones I found though:
Anyone able to say if both of those should have the name changed to match the new prefix? Anything else?
[The only other option I've seen is to "export blog from WP, create new installation with different table prefix, import the export file" -- but I've had terrible luck with importing things like users and links so I'm reluctant to go that route.]
[And if anyone has link to how to use this "feature" of multiple blogs sharing these tables, please do post a link.]