I'm having problems moving a wordpress site from one domain to another. I've searched the site but couldn find a useful answer for my situation.
Here's what i did:
I made a backup of the website. Then i exported the database. Then i installed Wordpress on the other domain. Then i copied all my Wordpress files of the old website on the new server overwriting the new installation. Then i deleted everything from the database on the new server and imported the database of the old server. Then i changed the database name and bpassword in the wp-config file.
So i did all this but the new site isn't working, and i don't know where it went wrong? So i'd like to start over, but what should i do different?
Thankyou for your help!
You can run these sql queries in phpmyadmin to change URLs in the database after the move for site options, post URLs and URLs in post/page content:
4/22/2014 Edit: this is a much better solution that won't break PHP serialized data: interconnectit.com WordPress Serialized PHP Search Replace Tool
There is also a tool available for those who are not confident running SQL update scripts, found at:
Search and Replace for WordPress DB
Remember to delete files after performing the desired actions to the DB, because the script exposes DB username/password found in wp-config.php ;)
The main thing you need to do is update 2 fields in the database to the correct domain.
It can be done a few different ways.
Method 1:
Add this line to your wp-config.php file, then visit http://yournewdomain.com/wp-admin.php and log in. This will force the update:
After you log in, you should remove that line.
Method 2:
Add these 2 lines to your theme's functions.php file found at wp-content/themes/themename/functions.php
After that, you need to update the GUID for each post. In phpMyAdmin or from the mysql command line issue this:
replace exampleoldsite and examplenewsite with the respective domains.
All of this info can be found at http://codex.wordpress.org/Changing_The_Site_URL
Instead of installing Wordpress on new server. Copy old files to new server, import database and change wp-config. I found this helpful How to Transfer a WordPress website to another Host
You will probably need to edit some fields in your database and update the settings in the admin area. There is quite a nice guide here
http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_to_a_New_Server
I think the easiest way is probably: