Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

How do I transfer a Wordpress site from one URL to a new URL and host?

The Wordpress site is complete, but now I need to transfer the site from my test URL andelltestsite.com to my client's URL bigstuffmovers.com... I researched how to do this and I seemed to have broken both sites in the process. Can someone please help!

Hugo Paz
Hugo Paz
15,622 Points

Hi Andell,

Can you please post what you did and what errors you are getting?

Sure, so I followed these steps http://codex.wordpress.org/Moving_WordPress

Changing Your Domain Name and URLs

Moving a website and changing your domain name or URLs (i.e. from http://example.com/site to http://example.com, or http://example.com to http://example.net) requires the following steps - in sequence.

1) Download your existing site files. 2) Export your database - go in to mySQL and export the database. 3) Move the backed up files and database into a new folder - somewhere safe - this is your site backup. 4) Log in to the site you want to move and go to Settings > General, then change the URLs. (ie from http://example.com/ to http://example.net ) - save the settings and expect to see a 404 page. 5) Download your site files again. 6) Export the database again. 7) Edit wp-config.php with the new server's mySQL database name, user and password. 8) Upload the files. 9) Import the database on the new server.

Hugo Paz
Hugo Paz
15,622 Points

Did you do the remaining steps? Using the script to run through the database to change all the urls?

No I didn't, I wasn't sure how to do that

Hugo Paz
Hugo Paz
15,622 Points

You need to do it, from the codex:

"When your domain name or URLs change there are additional concerns. The files and database can be moved, however references to the old domain name or location will remain in the database, and that can cause issues with links or theme display."

If you use the script on step 2, it should fix your errors.

Cool, I'll try it and see, thanks for all of your help Hugo, I really appreciate it!

1 Answer

Hamish McKay
PLUS
Hamish McKay
Courses Plus Student 9,133 Points

Another solution that i use to transfer a site is to use a plugin called Duplicator. It's an easy way to transfer a whole site over to a new domain.

https://wordpress.org/plugins/duplicator/