Replicate a blog
I had to copy a blog A to a blog B with different domains. I document here the main attributes I had to use for my task. Please replace them with your own values. My task was successful with the hosting provider STRATO. Please check the feasibilty with your hosting provider.
- Access your hosting provider administration page
- Create a new blog B and link it to blogb_domain
- Get relevant attributes of blog B from hosting provider: blogb_db_name, blogb_db_user, blogb_db_pwd, blogb_host_directory
- copy all files from bloga_host_directory/* to blogb_host_directory/* (e.g. via FileZilla)
- edit blogb_host_directory/wp-config.php
- Access your Blog A domain host via putty
- create backup of bloga_db (see strato as example):
mysqldump bloga_db_name --add-drop-table -h provider_db_host -u bloga_db_user -pbloga_db_pwd > blog.sql
- Access your Blog B domain host via putty
- Transfer blog.sql
- restore the backup of blog A to blog B (see strato as example):
mysql -h provider_db_host -u blogb_db_user -pbloga_db_pwd blogb_db_name < blog.sql
- Access the Blog B Database (e.g. using php admin)
- Access table: wp_options and replace
- siteurl = blogb_domain
- blogdescription = blogb_description
- home = blogb_domain
- Texts in the posts can be replaced as follow:
UPDATE wp_posts SET post_content = REPLACE ( post_content, 'text to find here', 'text to replace here');
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?