positif negatif

Manually Migrate WordPress To A Different Domain

If you don’t want to use a plugin to migrate wordpress to a different domain, you must be able to have access to the database.

The first thing to do in the new domain, after all the wordpress files are imported and the database is also imported, namely:

Edit the wp-config.php file

In the wp-config.php file we need to add information that the domain changed:

define( 'WP_HOME', 'https://newurl' );
define( 'WP_SITEURL', 'https://newurl' );

Update Domain in Database

Now go to the database, then run the following query:

UPDATE wp_options SET option_value = replace(option_value, 'oldurl', 'newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'oldurl','newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'oldurl', 'newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl','newurl');

oldurl = page domain

newurl = new domain

siteurl = new domain

My advice, before using this manual version, it is better if the domain migration is done via cpanel, if there is no cpanel then use the following plugins :

  • All-in-One WP Migration
  • UpdraftPlus
  • Your wp shipper
  • Migrate Guru


This post is also available in: Indonesian

Silakan berikan komentar, pertanyaan, maupun sanggahan. InsyaAllah dibalas secepatnya.