Relocate your WP website

Move your WordPress website anywhere in 10 minutes via an SSH shell with access to your website files directory and database.

Current URL:
Where to:

Or, complete URL change, it doesn’t matter using this method.

Export your WordPress database.

mysqldump -u loginID -p example.com_wp > example.com_wp.sql

Now bust out a little sed.

cat example.com_wp.sql | s/\/wordpress/ > new.sql

Now import your db sed edits.

mysql -u loginID -p example.com_wp < new.sql

Now move your directory files.

cd /var/www/
tar cvf all.tar *
mv all.tar ../
cd ../
tar xvf all.tar
rm ./wordpress
rm all.tar

Done. Visit


Leave a Reply

Your email address will not be published. Required fields are marked *