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

Stavros Sofroniadis
PLUS
Stavros Sofroniadis
Courses Plus Student 1,503 Points

About WordPress Migration

In WordPress Migration video tutorial was mentioned that we write into wp-config.php file new 2 lines of code.

define('WP-HOME' , http://www.example.com')'; define('WP-SITEURL' http://www. example.com');

if you could assist what is mentioned with the above,

Thank You,

1 Answer

Sam Kajjan
Sam Kajjan
20,547 Points

To manually migrate WordPress from local to live domain or from one web hosting to another there are few simple steps:

1- Install wp clean install where you want to move WordPress (i recomend you to use the same version)

2- copy the wp-content filder to the clean install

3- in the wp clean install go to the database using PHP MyAdmin or equivalent and delete all the tables

4- import the database into the clean wp install

5- In tables columns in PHP MyAdmin (located on the left) look for a table called OPTIONS, when u click on it (on the right side) change the urls to the new url (NO NEED TO CHANGE URLS IN THE WP CONFIG)

IF YOU CHANGED THE DB TABLE PREFIX WHILE YOU INSTALLED THE ORIGINAL WP INSTALL YOU WANT TO MOVE, MAKE SURE YOU PUT THE SAME DB TABLE PREFIX in the NEW WP CONFIG

Last step: Login to your WP RECENTLY MOVED and install this plugin to change the rest of urls and that’s it. The use of the plugin is very easy.

https://wordpress.org/plugins/velvet-blues-update-urls/