Skip to main content
Help Center
The GoDaddy Community will undergo maintenance starting on Wednesday, July 28th at 3pm PST / 6pm EST. Learn more
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
PUMC
New

Cpanel create staging site

I would like to create a staging site for our godaddy Cpanel account.  Your instructions are your old version of your website not your new version.  Please give me instructions on how to do this.

1 ACCEPTED SOLUTION
PL281
Super User IV

@PUMC 

 

cPanel does not have an easy way to create a staging site. The only platform at GoDaddy with this functionality built in is the Managed WordPress Platform.... 

 

That said - here are the manual steps required to copy a WordPress site on a cPanel server

 

Step 1. Copy website files to new location
Log on your hosting control panel. In this article, we will use a cPanel web hosting in the demo. In cPanel, go to the Files section, click to open File Manager. Make sure to show hidden files in cPanel File Manager.

Select all WordPress files or the whole folder in File Manager, then click Copy at the top left side of the File Manager, or right click on the files or folder, choose Copy from the contextual menu. You will then be prompted to enter the file path that you want to copy these files or folder to. Type the path to the new location to save the WordPress files to.

 

Step 2. create WordPress database
Go to create a MySQL database in cPanel from cPanel > Database Tools > MySQL databases. Make sure to give the new database a new name. You can add the same user to the new database. Creating a new user and adding it to the new database will also work, but requires extra steps.


Step 3. Import data to new WordPress database
The newly created MySQL database is empty without any data. We need to export data from existing database and import it to the new one. This can be done using the phpMyAdmin tool which is also pre-installed in cPanel. 

In phpMyAdmin, select the WordPress database, choose Export to download a copy of your database from MySQL server to your local computer. Then open the new WordPress database in cPanel, choose Import and restore the MySQL database through phpMyAdmin in cPanel

 

Step 4. Edit database configuration for new WordPress site
The wp-config.php file is the WordPress configuration file. You need to update the database information accordingly. Remember that we created a new database with a new name. Update the database name in the configuration file. If you created new database user, you need to update the database username and password as well.

 

Step 5. Create sub-domain for the test site
You need to test the website using a temporary URL. A sub-domain is ideal for website testing and development purposes. 

Make sure to redirect the sub-domain to the location or directory where you have copied the WordPress site files to.

 

Step 6. Change site URL for the test site
The WordPress site URL or domain is saved in its database. We need to replace it with the new sub-domain or URL we have created above. Since you can’t access the WordPress test site yet, you will need to update the site URL from its database via phpMyAdmin first.

Lastly you can choose to update the image URLs from the database. This step is not mandatory when you clone the WordPress site for testing purpose.

 

NOTE: This creates a copy of the site, but doesn't give you the ability to "sync" the two sites - You would want to use a plugin like All In One Migration - Also note - if you use the and you have Forms / Commerce Orders - when you do the migration/sync it will overwrite the content

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post

1 REPLY 1
PL281
Super User IV

@PUMC 

 

cPanel does not have an easy way to create a staging site. The only platform at GoDaddy with this functionality built in is the Managed WordPress Platform.... 

 

That said - here are the manual steps required to copy a WordPress site on a cPanel server

 

Step 1. Copy website files to new location
Log on your hosting control panel. In this article, we will use a cPanel web hosting in the demo. In cPanel, go to the Files section, click to open File Manager. Make sure to show hidden files in cPanel File Manager.

Select all WordPress files or the whole folder in File Manager, then click Copy at the top left side of the File Manager, or right click on the files or folder, choose Copy from the contextual menu. You will then be prompted to enter the file path that you want to copy these files or folder to. Type the path to the new location to save the WordPress files to.

 

Step 2. create WordPress database
Go to create a MySQL database in cPanel from cPanel > Database Tools > MySQL databases. Make sure to give the new database a new name. You can add the same user to the new database. Creating a new user and adding it to the new database will also work, but requires extra steps.


Step 3. Import data to new WordPress database
The newly created MySQL database is empty without any data. We need to export data from existing database and import it to the new one. This can be done using the phpMyAdmin tool which is also pre-installed in cPanel. 

In phpMyAdmin, select the WordPress database, choose Export to download a copy of your database from MySQL server to your local computer. Then open the new WordPress database in cPanel, choose Import and restore the MySQL database through phpMyAdmin in cPanel

 

Step 4. Edit database configuration for new WordPress site
The wp-config.php file is the WordPress configuration file. You need to update the database information accordingly. Remember that we created a new database with a new name. Update the database name in the configuration file. If you created new database user, you need to update the database username and password as well.

 

Step 5. Create sub-domain for the test site
You need to test the website using a temporary URL. A sub-domain is ideal for website testing and development purposes. 

Make sure to redirect the sub-domain to the location or directory where you have copied the WordPress site files to.

 

Step 6. Change site URL for the test site
The WordPress site URL or domain is saved in its database. We need to replace it with the new sub-domain or URL we have created above. Since you can’t access the WordPress test site yet, you will need to update the site URL from its database via phpMyAdmin first.

Lastly you can choose to update the image URLs from the database. This step is not mandatory when you clone the WordPress site for testing purpose.

 

NOTE: This creates a copy of the site, but doesn't give you the ability to "sync" the two sites - You would want to use a plugin like All In One Migration - Also note - if you use the and you have Forms / Commerce Orders - when you do the migration/sync it will overwrite the content

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post