I have a Wordpress website published on a remote PC. I want to back it up it totally on my local CentOS PC, including posts, images, videos, etc.
Here is what I have done:
- Download and install Wordpress on my local PC.
Back up the MySQL database on the remote PC using this command:
mysqldump --user=root --password=XXXXXX --opt wordpress > wordpressBK.sql
Restore the MySQL database on my local PC using this command
mysql --user=root --password=XXXXXXX wordpress < /home/mysqlDB/wordpressBK.sql
Now when I open my browser and go to http://localhost
, the backup seems successful, but the URLs of topics and images in Wordpress still go to my remote Wordpress address (e.g. http://www.AAABBBCCC.com/?p=1365
)
What I want is to copy everything to my local PC. How can I manually complete this backup?
If possible, I would prefer not to install plugins.
thank to the reply , after I change site URL in mysql DB ,it works here is what statement I execute
UPDATE wp_options SET option_value = replace(option_value, 'http://www.XXXXXXXX.com', 'http://192.168.3.116') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.XXXXXXXX.com','http://192.168.3.116');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.XXXXXXXX.com', 'http://192.168.3.116');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.XXXXXXXX.com','http://192.168.3.116');