As a Thesis Theme Developer, I handle moving Thesis WordPress Blogs across Test and Production hosting systems almost every week. In this post, I have detailed the steps you must follow to move a Thesis Powered WordPress across Hosting Systems – in most cases to a different Domain Name.
Prerequisites
- Running Thesis WordPress Blog on a Host/Domain
- Target Domain and Hosting where the Blog will run
- FTP and phpMyAdmin Access to both Hosting Systems
1. Backup of the Existing Blog
Backup of a WordPress Blog consistes of 2 essential steps:
- WordPress Files Backup
- WordPress Database Backup
For the first step, use a FTP Software like Filezilla to connect to your Current Hosting to backup all the WordPress Files. This includes all the content under the folder corresponding to the Domain, where your Blog is currently running.
For the next one, login to the phpMyAdmin Console and choose the Database with which your Blog is installed. Export the complete database contents, using the “Export” option. Retain the default options and save the resulting “.sql” file on to your Computer.
2. Upload the WordPress Content to New Hosting
First, use the FTP Software to connect to the New Hosting and transfer all the WordPress Files downloaded in the Step 1, to the folder corresponding to the New Domain.
You might want to edit the “wp-config.php” file with the New Database Details.
Second, login to the phpMyAdmin Console on New Hosting and choose the Database where the New Blog will reside. Using the “Import” option, upload the “.sql” file downloaded in Step 1 that contains all the WordPress Posts and related Setting.
3. Run the following Scripts to Wire Everything!
Now with all required content in place, we will need to wire them together. Run the following scripts in sequence on the New Database, through the phpMyAdmin Console.
This script will replace the Blog Domain details in the ‘wp_options’ table. This is essential for all links within your Blog like Posts, Pages etc. to work on the New Domain.
UPDATE wp_options SET option_value = replace(option_value, 'http://oldblogdomain.com', 'http://newblogdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
The following scripts will replace all links (if any) within the Posts/Pages, that are still pointing to the Old Domain.
UPDATE wp_posts SET guid = replace(guid, 'http://oldblogdomain.com','http://newblogdomain.com'); UPDATE wp_posts SET post_content = replace(post_content, 'http://oldblogdomain.com','http://newblogdomain.com');
This last script is “Thesis Theme Specific”. This will replace all the references to the Old Blog Domain, with respect to the Thesis Post Images. All these images are already copied to the New Hosting, when you transferred the files. This script just changes the references!
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://oldblogdomain.com', 'http://newblogdomain.com') WHERE meta_key = 'thesis_post_image';
Once all these steps are completed, try to access the Blog under – http://newblogdomain.com
Make sure all the Links and the Images show up as usual. Now the Move is Complete! Let me know if you face any problems and I can try to help you.
Hi Ashwin,
Thanks for posting this. I’m a huge thesis fan and hacker – def not a professional developer, so tips like this help. I do have one very important question with respect to moving files/database to a new domain name…
IS there a way to automatically assign 301 redirects to the new domain/pages from the old domain/pages in order to preserve all inbound link equity for the old domain? Or, is the 301 redirects from the old domain/pages to new domain/pages a manual process?
Thank you in advance.
@RBeale
Hi Ryan,
Great that you found it helpful. I primarily use Apache (.htaccess) level 301 redirects to the New Domain/Pages from the Old Domain. This is a manual process and the pages have to be linked one after another – but this is effective. Also, it is recommended by Google to maintain your Old Domain for at least 180 days.
In few cases I have also used http://wordpress.org/extend/plugins/simple-301-redirects/ – but .htaccess 301 redirect is always better. Let me know your thoughts.
Regards,
Ashwin
Hi, one question. Do I need to have previously installed Thesis and WordPress on the target machine?
I’m hoping you read comments in your old posts dude. I recently just moved my thesis wordpress blog from hostgator to mediatemple following all of the steps, the blog is perfectly online with all the posts and plugins and everything, the one and only problem is that no images are showing up now, the wp-content folder is properly uploaded to the new host, and the domains are the same.