The ability to copy a WordPress site is really useful for several reasons, especially if you’re considering a redesign or for testing purposes. Having a copy of a “starter” WordPress site also comes in handy if you deploy new websites for clients with the same settings, plugins and themes installed. In this post, we’ll cover how to copy a WordPress site in just a few steps.
Getting Started: The Components of a WordPress Website
A WordPress website is made up of two basic components. Both components will need to be included to have a copy of your website:
- 1. The WordPress database. The WordPress database contains the content (text) of your WordPress posts, pages, comments, and users.
Making a Copy of Your WordPress Website is Just Like Making a Backup
Copying your WordPress website is very similar to making a backup. A WordPress backup essentially makes a copy of your entire WordPress installation (including your WordPress database and all files in your WordPress installation). Just like making a backup, you’ll also need an easy way to access your backup files in a downloadable format.
How to Copy a WordPress Site: The Manual Method
In this section, we’ll cover the manual method for how to copy a WordPress site. If you aren’t comfortable with editing code or browsing files on your server, you can skip ahead.
Copying Your Site’s Database
- 1. To copy your site’s database, you’ll need access to phpMyAdmin on your site’s server. As a quick reference, you’ll find the phpMyAdmin icon located after logging in to cPanel.
- 2. Click on the phpMyAdmin icon and login. (If you’re already logged into cPanel, phpMyadmin should launch automatically.)
- 3. From left side of the page, select your WordPress database. In this example, the name of database is “wp”.
- 4. You should now see all the tables included in your WordPress database (for example: wp_commentmeta, wp_comments, wp_options, wp_posts, etc.)
- 5. Click the ‘Export’ tab on the top set of tabs. Select the “Quick” option, and the click the Go button.
Your database file should download automatically in an .sql format. Depending on the database size, this may take a few seconds.
Copying Your Website’s Files
You can use an FTP client to manually copy the files on your server to a folder on your computer. Once you’ve downloaded the files, you can zip or compress them into a zip file. Note: depending on the size of your site, this download could take a while.
How to Use the BackupBuddy Plugin to Copy a
WordPress Site The Easy Way!
The WordPress backup plugin, BackupBuddy, makes copying WordPress sites much easier than the manual method. With BackupBuddy, there’s no need to manually export or download any files.
Here are a few ways BackupBuddy makes copying a WordPress site easier:
- You can copy your WordPress site directly from your WordPress dashboard (no need to login to cPanel or an FTP client).
- Your can download your entire WordPress website (including your database and files) into a zip file in a matter of minutes (sometimes seconds).
- You can quickly move your website copy to a new location such as a different domain, host or testing server with BackupBuddy’s ImportBuddy script.
Getting Started with the BackupBuddy
- 1. To get started, install and activate the BackupBuddy plugin on your WordPress website. You can buy BackupBuddy here and then download the plugin zip file from the iThemes Member
- 2. Once you’ve activated the BackupBuddy plugin, expand the BackupBuddy menu on the left side of your WordPress dashboard and click the ‘Backup’ link.
- 3. On the Backup page, click the Complete Backup button to start running a backup of your site’s files and database.
- 4. Once the backup has completed, you can download your backup file as a zip file to your computer. This backup file is essentially a complete copy of your WordPress site.
- 4. Once you’ve downloaded the backup zip file, you can expand it to see the contents. This is the copy of your website.
How to Move WordPress Site Copy to A Different Domain, Host or Staging Server
Once you have a copy of your WordPress site, you’ll likely want to use it for a testing environment or for development. To do this, you need to move your WordPress site copy to a different directory on your server, to a new domain or to a localhost.
The Manual Method of Moving Your WordPress Site
If you’re interested in manually moving your website copy, use these two posts as a reference. These posts include more in-depth instructions if you want to tackle doing it manually.
- From the WordPress Codex: Moving WordPress
- From the WordPress Codex: Restoring Your Database From Backup
How to Use BackupBuddy To Move Your WordPress Site
BackupBuddy makes the process of moving a WordPress website easy by automating the process.
For example, BackupBuddy removes these complicated steps from the process:
- Editing the wp-config.php with the new server’s MySQL database name, user and password.
- Searching and replacing on your entire database to change URLs
- Changing uploaded media to refer to the new location
- Migrating serialized data
How to Move Your WordPress Site with BackupBuddy
- 1. Download your complete backup file and leave it in the zip format (see steps 1 – 4 above in the “Getting Started with BackupBuddy” section). Note: Don’t unzip the backup file.
- 2. Navigate to the Restore/Migrate page in the BackupBuddy menu. Click the button to download the ImportBuddy script.
- 3. Confirm your ImportBuddy password. In the window that pops up, enter a new password or leave blank to use the ImportBuddy password you set up when you first installed BackupBuddy. This password is important because it locks the ImportBuddy script from unauthorized access. Click OK and the download will begin.
- 4. The next part of the process requires you to create a database on your server for your copied WordPress site. BackupBuddy will handle taking the database from your copy and replacing the tables, but you still need a new, blank database.
For step-by-step instructions on how to create a new MqSQL database, see this post:
A Step by Step Guide for How to Move a WordPress Site to a New Domain with BackupBuddy
- 5. Next, upload the backup zip file and the ImportBuddy file into the directory of the new/moved site on your server. (Basically, a directory is where your WordPress site “lives” on your server. All the files that run the WordPress site are located within this folder (directory).) For this step, you can use FTP access to the server or the File Manager within your cPanel. You just need to have access to upload (or delete) files on your server.
- 6. Open the directory (folder) of the final location of the WordPress site. Note: Most hosting providers will automatically set up and name the directory when you add the domain name to your hosting account. Your directories will be located in the /public_html directory. IMPORTANT: This directory will need to be empty prior to uploading the backup zip file and the importbuddy.php file. If there are existing files in this directory, go ahead and delete them so you have an empty folder.
- 7. Upload the importbuddy.php file and the backup zip file to this empty directory. You can use the Upload function within the File Manager here. 14. After you upload the importbuddy.php file and the backup zip file, the directory should look like this:
- 8. This final series of steps will guide you through using ImportBuddy to finish up the site move. Navigate to the site URL/importbuddy.php. For our example site move, we’d visit this link in your browser.
- 9. Follow the remaining ImportBuddy steps to complete the site move. Input your new database credentials on step 3. On the last step, verify the site is working by clicking on the site URL.
- 10. Click the “Finish Cleanup” button. That’s it! You’ve successfully moved your WordPress site copy to a new location.
Get BackupBuddy Now
Get BackupBuddy, the 3-in-1 WordPress backup plugin. Easily backup, restore and migrate your WordPress site with BackupBuddy.