CMS & WordPress
I've got a wp site on a domain which works just fine.
I'm trying to set up a sub-domain with a wp install as a test bed but am having severe problems.
I've set the subdomain up so it looks like http://test.domain.com.
I've used cpanel fantastico to install wp into test.domain.com and it works just fine.
I've dumped the 'live' wp database in to a text file.
Whenever I try to import the 'live' db into the 'test' db (whether I drop all the tables first or clear all the tables first) the test site stops working and all I get when I try to log in is:
'You do not have sufficient permissions to access this page.'
when I type test.domain.com into my browser I just get a blank screen.
Any ideas anyone?
btw, both the 'live' install and the 'test' install are v 3.1
p.s. posted this at wp support forum but they jsut seem utterly overwelmed by the volume of posts.
Don't import the users table in the new install. WP uses a hash key to encrypt the passwords, and this key (stored in the config.php) should not be the same in both installs.
If you need to import the users table, you'll have to edit the config.php and set the hash key(s) to the values of the old install.
I tried that - didn't import the wp_users table - made no difference at all.
I re-installed wp in the test subdomain and only set up one user in that install. Dropped all references to wp_users table in the db dump before I imported it ...
still getting the 'You do not have sufficient permissions to access this page.' message when I try to log in.
Even added a new user (via phpmyadmin) to the new install ... same result!
Does it all work before importing anything?
Search the database dump for absolute and relative paths (some plugins store them in the database), and modify them if needed. Don't forget to upload the wp-content folder to the new install as well.
Ahh, and don't forget to check the .htaccess file as well
Yep, works just fine before importing - blank install with Twenty Ten theme ... so it's obviously something I'm doing.
Interestingly, when I import the database (users and all) to my local WAMP set up it works just fine.
There is a difference though.
I want to be able to tell (should the need arise) which database I might be working on ... so the live db (and the db I'm using in my WAMP server) has a prefix of xxx_ (instead of the usual wp_) on all the tables and the database I'll be using in the test.domain has the normal, standard wp_ prefix on the tables ...
not anything to do with that, is it?
I suppose you changed the table prefixes in the database dump from xxx_ to wp_ before doing the import?
Do a search inside the dump and see if there's data that contains xxx_
I searched the dump and found the problem ... there were lots of references to 'xxx_' in the usermeta table.
I changed them to 'wp_' and all worked fine.
Thanks for helping.