Copy and paste a blog in few steps

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');
1 Antwort
  1. Gary Gabriel sagte:

    Thanks for the interesting article. It is useful and valuable. Because as you demonstrate; it uses a format that ports to a general document data schema. It serves as a guide to compare and improve a schema to use as an API in web-based and document based systems. It also presents the structure in a useful and understandable format. I have taken it to improve the generalization of my document API.

    – Gary Gabriel


Dein Kommentar

An Diskussion beteiligen?
Hinterlasse uns Deinen Kommentar!

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.