Replicate a blog

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.

Blog A

  • bloga_domain
  • bloga_db_name
  • bloga_db_user
  • bloga_db_pwd
  • bloga_host_directory

Blog B

  • blogb_domain
  • blogb_description
  • blogb_db_name
  • blogb_db_user
  • blogb_db_pwd
  • blogb_host_directory


  • 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
define('DB_NAME', 'blogb_db_name');
define('DB_USER', 'blogb_db_user');
define('DB_PASSWORD', 'blogb_db_pwd');


  • 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
    1. siteurl = blogb_domain
    2. blogdescription = blogb_description
    3. 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');