Mobile app version of vmapp.org
Login or Join
Goswami781

: How to copy Wordpress website within same hosting? I use bluhost web hosting. I already have mysite1.com. I want to copy this website to different domains within the same hosting, eg. mysite2.com,

@Goswami781

Posted in: #Domains #WebHosting #Wordpress

I use bluhost web hosting.

I already have mysite1.com. I want to copy this website to different domains within the same hosting, eg. mysite2.com, mysite3.com, and so on. All sites will have the same content as mysite1.com.

How can I do it in fastest possible way ?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Goswami781

3 Comments

Sorted by latest first Latest Oldest Best

 

@Turnbaugh106

I use a free WordPress plugin, Duplicator, for cloning my live site for testing purposes. It'll backup the entire mysite1.com directory structure (you can exclude whatever dirs/files that you want) and it'll backup the entire database, too.

Unfortunately it doesn't allow for backup/restore of only certain database tables. It handles the search/replace of your database, i.e., any hard-links. So you run Duplicator from your site1.com admin, download/upload the backup created by Duplicator to your new (must be empty) folder for mysite2.com. Or, you could use SSH to do the copy much faster than downloading it to your computer then uploading it to the new dir.

Once you've got the backup to your desired folder, just go to mysite2.com/installer.php and Duplicator prompts you for the new database details (remember, Duplicator needs a blank db to restore to, or you can force it to overwrite an existing db).

It's actually simpler than it sounds.

Edit: You didn't mention if your hosting allows you to point different domains to different directories. If it doesn't, let me know. It's easy via .htaccess to handle the redirects. I use GoDaddy's Economy plan, which allows unlimited domain addons but they all point to root. I use .htaccess to point all of my different domains to their respective directories.

Here's a step-by-step:


if using a caching plugin, clear the cache and turn it off during the backup
backup with Duplicator
if using SSH, copy (or move) the following two files:

site1.com/wp-snapshots/xxxxxxx_package.zip
site1.com/wp-snapshots/xxxxxxx_installer.php (rename to installer.php in destination directory)


to your site2.com root directory, e.g., public_html/site2/. Duplicator also creates a standalone MySQL backup file, but you can ignore it since the database is also saved in package.zip
If not using SSH, you can move the above files via FTP, or download via Duplicator's interface the package.zip & installer.php to your computer and upload via FTP.
in your browser, go to site2.com/installer.php
a Duplicator form will appear. Leave the 'Settings' section as is
enter your new database details (click 'Test Connection' if desired)
checkmark 'I have read...' and click 'Install'
follow the simple directions on the page that appears and you're done!


Duplicator takes care of the WP backend stuff like changing the site url in admin, fixing any hard-coded links that point to site1.com in your database, etc. It reminds you to clear your cache if you're using a caching plugin.

10% popularity Vote Up Vote Down


 

@Ravi8258870

Steps are as follow:


Copy the root folder of mysite1.com, in your case folder is mysite1.
Paste it in the root of your hosting and rename it as mysite2.
Go to MySql database of mysite1.com and export the data.
Create another database, mysite2data and import the data to this database.
Now goto mysite2 -> wp-config.php. Open the file.
Now change the following details

/** MySQL database username */
define('DB_USER', '**mysite2 username**');

/** MySQL database password */
define('DB_PASSWORD', '**password**');

/** MySQL hostname */
define('DB_HOST', '**mysite 2 database path**');



And you are ready to go.

10% popularity Vote Up Vote Down


 

@Si4351233

Download all the files from mysite1.com via FTP and upload them to mysite2.com or mysite3.com - it should take no longer than a few minutes.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme