WordPress hangs on log in after migrating
After trying to move WordPress from local machine to my production machine, I have done the following:
- Import my current local database into production database
- Updated my wp-config.php file with correct information
- Went into phpmyadmin, updated 'siteurl' and 'home' with correct URL
- Finally, I was able to see the wordpress site, and everything else works fine.
- When I try to log in, however, it hangs. I don't get error messages, or no开发者_如何学JAVAthing..
Here's what I did, in my attempt to fix it (unsuccessful):
- Re-uploaded wp-login.php file.
- clear cookies, cache
both servers are using IIS7.. any clues?
EDIT
One thing I noticed is that, I can't login to any php based logins.. I tried logging in phpmyadmin, but it didn't work for me.
One thing I know for sure is that, the new server doesn't recognize index.php as default document. Could that be a problem?
You need to change all the URLs in your SQL file to match the new installation.
Here is an example data that needs to be replaced. Make sure you find and replace all instances. You can use any text-editor with find and replace capabilities (I use Notepad++ http://notepad-plus-plus.org/ usually)
Assuming you are moving from a local installation http://localhost/example/
to http://www.example.com/
Step 1. replace http://localhost/example/
by http://www.example.com/
Step 2. replace localhost\\/example\\/
by www.example.com\\/
(This is required if you are using some plugin which stores the data in this way like revolution slider)
Step 3. replace http://localhost/example
by http://www.example.com
Step 4. replace localhost/example
by www.example.com
Hope this helps.
Try changing all URLs in the database, not just the site and home on options.
UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');
精彩评论