Restore WordPress site from backup

I’m doing regullar backups using BackUpWordpress plugin.

Find the backup file in directory like this /var/www/wordpress/wp-content/backupwordpress/ and copy it to new WordPress site location.

cd /var/www/wordpress/
mysql -h localhost -u root -p database-name < my-site-complete-backup.sql
rm -f my-site-complete-backup.sql

If you moved your site to another domain name, you will need to do this hack.


Find this line:

require( dirname(__FILE__) . '/wp-load.php' );

and insert the following lines below:

update_option('siteurl', '' );
update_option('home', '' );

Login to WP runing on new domain: https://your.domain/wp-admin/

Do not forget to remove hack lines in the end!

Print Friendly, PDF & Email