---
title: How to Duplicate a WordPress Website
description: "🌐This guide is also available in Arabic[← اقرأ بالعربية](https://kb.tarweig.com/docs/%d9%83%d9%8a%d9%81%d9%8a%d8%a9-%d8%a7%d8%b3%d8%aa%d9%86%d8%b3%d8%a7%d8%ae-%d9%88%d9%85%d8%b6%d8%a7%d8%b9%d9%81%d8%a9-%d9%85%d9%88%d9%82%d8%b9-%d9%88%d9%88%d8%b1%d8%af%d8%a8%d8%b1%d9%8a%d8%b3-duplicat/) In this article, you will learn how to easily duplicate a WordPress website for development or testing purpose. 1. Log into your [cPanel](https://kb.tarweig.com/en/docs/how-to-login-cpanel-whm/) 2. Create a subdomain The [subdomain](https://kb.tarweig.com/en/docs/how-to-create-new-subdomain-in-cpanel/) will be used…"
url: "https://kb.tarweig.com/en/docs/duplicate-wordpress-website/"
updated: "2026-10-11"
category: Applications Management
---

# How to Duplicate a WordPress Website

🌐This guide is also available in Arabic[← اقرأ بالعربية](https://kb.tarweig.com/docs/%d9%83%d9%8a%d9%81%d9%8a%d8%a9-%d8%a7%d8%b3%d8%aa%d9%86%d8%b3%d8%a7%d8%ae-%d9%88%d9%85%d8%b6%d8%a7%d8%b9%d9%81%d8%a9-%d9%85%d9%88%d9%82%d8%b9-%d9%88%d9%88%d8%b1%d8%af%d8%a8%d8%b1%d9%8a%d8%b3-duplicat/)

In this article, you will learn how to easily duplicate a WordPress website for development or testing purpose.

1. Log into your [cPanel](https://kb.tarweig.com/en/docs/how-to-login-cpanel-whm/)

2. Create a subdomain

The [subdomain](https://kb.tarweig.com/en/docs/how-to-create-new-subdomain-in-cpanel/) will be used for accessing the development site. For example: dev.domain.com.

3. Go to your “File Manager”

The [file manager](https://kb.tarweig.com/en/docs/use-file-manager-cpanel/) can be launched from your cPanel control panel.

4. Copy your WordPress Files

The next step us to copy the files of your WordPress site from your current directory to the document root directory created for your subdomain (dev.domain.com).

The root directory usually is the same name as the subdomain that was
 created. (Or you can also copy those WordPress files/folders from current directory to that subdomain directory, using FTP client software, such as [FileZilla](https://kb.tarweig.com/en/docs/how-to-use-ftp/)).

5. Create a new database

This will be used to separate the test site from your main site. If you use the same database for the development site, the live site will reflect the changes that are made on the test site. Importing the existing database to the test site database will prevent this. You can [create a new database](https://kb.tarweig.com/en/docs/create-mysql-database/), by using PhpMyAdmin in cPanel.

6. Export your current database

You can easily [export your database](https://kb.tarweig.com/en/docs/exporting-databases-tables-phpmyadmin/), by using PhpMyAdmin in cPanel.

7. Import your Database

Now you will need to [import](https://kb.tarweig.com/en/docs/importing-databases-phpmyadmin/) the recently exported database, to the new database that you have created. This can be done from the very same phpMyAdmin.

8. Change the site URL

The final step is to change the site URL for your development site. This can be easily done by adding the following code snippet into your wp-config.php file:

```
define('WP_HOME','http://dev.domain.com');
define('WP_SITEURL','http://dev.domain.com');
```

That’s it. Now you know how to duplicate a WordPress website for development or testing purpose.
