Site Migration using Command line

Take a backup of SOURCE site Database,

mysqldump -u [USERNAME] -p[PASSWORD] > /var/www/

rsync all files and folder from SOURCE server to REMOTE server,

cd /var/www/

rsync -avzh --progress --exclude=wp-config.php . [USER]@[REMOTE_HOST]:/var/www/[REMOTE_HOST].com/

On Remote server import Database,


Setup Home and Site URL in Remote wp-config.php file,

define( 'WP_HOME', 'http://[REMOTE_HOST].com' );
define( 'WP_SITEURL', 'http://[REMOTE_HOST].com' );

Important: Do not forget to search and replace older host name with REMOTE host name.

Read this tutorial on how to migrate WordPress using rsync

results matching ""

    No results matching ""