{"id":28061,"date":"2020-11-21T12:45:18","date_gmt":"2020-11-21T12:45:18","guid":{"rendered":"https:\/\/rarathemes.com\/blog\/?p=28061"},"modified":"2024-08-21T13:45:53","modified_gmt":"2024-08-21T08:00:53","slug":"setup-wordpress-staging-site","status":"publish","type":"post","link":"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/","title":{"rendered":"How To Setup a WordPress Staging Site?"},"content":{"rendered":"\n<p>Editing your live site can be risky. You never know which edit might go wrong, especially when using a new theme, plugin, or feature. Such action can cause your whole site to break down&#8211;this is where a staging site comes in handy.<\/p>\n\n\n\n<p>WordPress allows you to set up a staging environment to test plugins, themes, features, and all functionalities before putting your site live. You can find errors on your site, if any, and find a solution to it without touching your live website.<\/p>\n\n\n\n<p>But the problem is, not many users know how to set up a WordPress staging site. If this is your problem too, this guide will help you out.<\/p>\n\n\n\n<p>After going through this guide, you can set up a WordPress staging site on the go.<\/p>\n\n\n\n<p>Sit back, relax, and read below:&nbsp;<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title ez-toc-toggle\" style=\"cursor:pointer\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#What_is_a_Staging_Website\" >What is a Staging Website?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Why_Set_Up_A_WordPress_Staging_Site\" >Why Set Up A WordPress Staging Site?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#How_To_Set_Up_A_WordPress_Staging_Site\" >How To Set Up A WordPress Staging Site?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Method_1_Setting_Up_A_WordPress_Staging_Site_Using_Plugin\" >Method 1. Setting Up A WordPress Staging Site Using Plugin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Method_2_Setting_Up_A_WordPress_Staging_Site_Manually\" >Method 2. Setting Up A WordPress Staging Site Manually<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Step_1_Create_a_subdomain_using_cPanel\" >Step 1: Create a subdomain using cPanel.&nbsp;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Step_2_Create_An_FTP_Account\" >Step 2: Create An FTP Account<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Step_3_Upload_your_WordPress_files_to_your_staging_site\" >Step 3: Upload your WordPress files to your staging site<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Step_4_ExportImport_Database\" >Step 4: Export\/Import Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Step_5_Edit_wp-configphp_on_a_new_database\" >Step 5: Edit wp-config.php on a new database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Step_6_Restrict_Access_to_Your_Staging_Site\" >Step 6: Restrict Access to Your Staging Site.<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Migrating_WordPress_Staging_To_Live\" >Migrating WordPress Staging To Live<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Q_What_is_WordPress_staging\" >Q. What is WordPress staging?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Q_What_is_a_staging_URL\" >Q. What is a staging URL?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/rarathemes.com\/blog\/setup-wordpress-staging-site\/#Wrapping_Up\" >Wrapping Up<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_Staging_Website\"><\/span>What is a Staging Website?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>A staging website is a replica of your existing site. A staging website lets you make changes on your site and test it before taking it to your live website.&nbsp;<\/p>\n\n\n\n<p>Thus, a staging site is a clone of your site where you can examine any new changes you want to bring on your actual website.<\/p>\n\n\n\n<p>A staging website has two key difference as compared to your live website:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A staging website you create is only available to you. The public cannot access it.<\/li><li>Any changes you make on a staging environment does not affect the live website.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Set_Up_A_WordPress_Staging_Site\"><\/span>Why Set Up A WordPress Staging Site?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are some of the reason to set up a WordPress staging site:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You can make changes to the site without worrying about the damage to your real website.&nbsp;<\/li><li>You can rest assured that your visitor&#8217;s browsing experience is not disturbed while you are making changes.<\/li><li>Your real site works normally until you put the changes live.&nbsp;<\/li><li>You can troubleshoot any issues relating to the theme, plugin, shortcodes, without disturbing your live site.<\/li><li>It eliminates the risk of a crash website.<\/li><li>You can trace the impact of the changes at your own pace. There is no time-constraint.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_To_Set_Up_A_WordPress_Staging_Site\"><\/span>How To Set Up A WordPress Staging Site?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Most of the users<a href=\"https:\/\/rarathemes.com\/blog\/install-wordpress-locally-windows-pc-wamp\/\" class=\"rank-math-link\"> install WordPress locally<\/a><strong> <\/strong>on their computer for testing purposes. After they finish testing, they upload it on their live server. This method may seem like a solution to your staging site need, but it has one major issue. What if the changes you make on your localhost do not appear on your live server?<\/p>\n\n\n\n<p>More than often, local hosts and the live server use different environments. Making a change in your local system does not guarantee expected results when you upload it on a live server.&nbsp;<\/p>\n\n\n\n<p>In this section, you will learn various methods to set up a WordPress staging environment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_1_Setting_Up_A_WordPress_Staging_Site_Using_Plugin\"><\/span>Method 1. Setting Up A WordPress Staging Site Using Plugin<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>We recommend using <a href=\"https:\/\/wordpress.org\/plugins\/wp-staging\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener nofollow\" class=\"rank-math-link\">the WP Staging <\/a>plugin to set up your WordPress staging site. The WP staging plugin is easy to use and has over 50k active installations.&nbsp;<\/p>\n\n\n\n<p>Here is how you use this plugin:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Go to your WordPress dashboard.&nbsp;<\/li><li>Search for &#8216;Plugins&#8217; on the left side panel and click on &#8216;Add New.&#8217;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"269\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/01\/add-new-plugin-from-dashboard.png\" alt=\"add new plugin from dashboard\" class=\"wp-image-31787\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/01\/add-new-plugin-from-dashboard.png 665w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/01\/add-new-plugin-from-dashboard-300x121.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/01\/add-new-plugin-from-dashboard-148x60.png 148w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Search for &#8216;WP Staging&#8217; on the search field.<\/li><li>Install and activate the plugin.&nbsp;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"680\" height=\"362\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/install-WP-staging-plugin.png\" alt=\"how to install and activate WP staging plugin\" class=\"wp-image-32680\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/install-WP-staging-plugin.png 680w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/install-WP-staging-plugin-300x160.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/install-WP-staging-plugin-113x60.png 113w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>You should see a new option labeled &#8216;WP Staging&#8217; on your dashboard&#8217;s left side panel. Click on it.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"305\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/WP-staging-option.png\" alt=\"WP staging option on the dashboard\" class=\"wp-image-32684\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/WP-staging-option.png 642w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/WP-staging-option-300x143.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/WP-staging-option-126x60.png 126w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Click on the &#8216;Create New Staging Site&#8217; button at the top of the page.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"360\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-new-staging-site-.png\" alt=\"how to create new staging site\" class=\"wp-image-32685\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-new-staging-site-.png 611w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-new-staging-site--300x177.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-new-staging-site--102x60.png 102w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Type the name for your staging site in the field.<\/li><li>Click on the &#8216;Starting Cloning&#8217; button at the bottom of the page.&nbsp;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"627\" height=\"393\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Starting-Cloning.png\" alt=\"how to give a name to the staging site and start clone\" class=\"wp-image-32686\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Starting-Cloning.png 627w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Starting-Cloning-300x188.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Starting-Cloning-96x60.png 96w\" sizes=\"auto, (max-width: 627px) 100vw, 627px\" \/><\/figure>\n\n\n\n<p><strong>Note:<\/strong> The time of finishing the cloning depends on the size of your site. Once the process ends, you will get a prompt. Now log in with your usual username and password. Now start testing the features on your new staging environment.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_2_Setting_Up_A_WordPress_Staging_Site_Manually\"><\/span>Method 2. Setting Up A WordPress Staging Site Manually<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If you want to get experimental with the custom codes, this method will help you out. This method is for creating a WordPress staging site using a subdomain. Here are the steps to do so. But before carrying on with this method, make a backup of your site.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_Create_a_subdomain_using_cPanel\"><\/span><strong>Step 1: <\/strong>Create a subdomain using cPanel.&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>To get on with this method, you first need to create a subdomain to house the staging site.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Go to the cPanel and look for the &#8216;Subdomain&#8217; option.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"680\" height=\"157\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Creating-subdomain-on-cPanel.png\" alt=\"Creating subdomain on cPanel\" class=\"wp-image-32679\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Creating-subdomain-on-cPanel.png 680w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Creating-subdomain-on-cPanel-300x69.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Creating-subdomain-on-cPanel-260x60.png 260w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Give a name to your subdomain. You can name it &#8216;Staging&#8217; or anything else.<\/li><li>Click on the &#8216;Create&#8217; button at the bottom.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"317\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/give-a-name-to-subdomain-and-create-it.png\" alt=\"how to add details in FTP account\" class=\"wp-image-32689\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/give-a-name-to-subdomain-and-create-it.png 700w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/give-a-name-to-subdomain-and-create-it-300x136.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/give-a-name-to-subdomain-and-create-it-132x60.png 132w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_Create_An_FTP_Account\"><\/span><strong>Step 2:<\/strong> Create An FTP Account<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Creating an FTP account makes sure to keep everything separate for your subdomain.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Find the &#8216;FTP Accounts&#8217; option on your cPanel and click on it.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"206\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-FTP-account.png\" alt=\"how to create FTP account\" class=\"wp-image-32691\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-FTP-account.png 700w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-FTP-account-300x88.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-FTP-account-204x60.png 204w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>A page opens up. Enter your FTP account details here.&nbsp;<\/li><li>Make sure that the &#8216;Directory&#8217; matches the directory of your subdomain.<\/li><li>Click on &#8216;Create FTP Account&#8217; at the bottom.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"472\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/add-FTP-account-detail.png\" alt=\"how to add details in FTP account\" class=\"wp-image-32690\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/add-FTP-account-detail.png 700w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/add-FTP-account-detail-300x202.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/add-FTP-account-detail-89x60.png 89w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_3_Upload_your_WordPress_files_to_your_staging_site\"><\/span><strong>Step 3: <\/strong>Upload your WordPress files to your staging site<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Next, use the FTP account you just made to upload your website&#8217;s files. Download the latest WordPress version and upload the files.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"530\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/upload-WP-files-on-FTP-account.jpg\" alt=\"upload WP files on FTP account\" class=\"wp-image-28071\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/upload-WP-files-on-FTP-account.jpg 730w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/upload-WP-files-on-FTP-account-300x218.jpg 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/upload-WP-files-on-FTP-account-83x60.jpg 83w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p>You also need to copy the following folders from the current WordPress site:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>&#8230;\/wp-content\/uploads<\/li><li>&#8230;\/wp-content\/themes<\/li><li>&#8230;\/wp-content\/plugins<\/li><\/ul>\n\n\n\n<p>Copying these files can take time, depending on the size.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_4_ExportImport_Database\"><\/span><strong>Step 4:<\/strong> Export\/Import Database<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Now you need to export your live website&#8217;s database and import it to the staging site.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Install and activate a plugin named &#8216;<a aria-label=\" (opens in a new tab)\" class=\"rank-math-link\" href=\"https:\/\/wordpress.org\/plugins\/wp-migrate-db\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">WP Migrate DB<\/a>&#8216; on your WordPress dashboard.<\/li><li>Go to &#8216;Tools&#8217; and click on &#8216;Migrate DB.&#8217;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"400\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/07\/go-to-Migrate-DB-settings.png\" alt=\"Migrate DB settings\" class=\"wp-image-32701\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/07\/go-to-Migrate-DB-settings.png 700w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/07\/go-to-Migrate-DB-settings-300x171.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/07\/go-to-Migrate-DB-settings-105x60.png 105w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Make sure to enter the same URL and directory you used to create your subdomain.<\/li><li>Click on the &#8216;Export&#8217; button at the bottom.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"407\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/add-new-url.png\" alt=\"how replace URL to import or export database\" class=\"wp-image-32704\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/add-new-url.png 700w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/add-new-url-300x174.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/add-new-url-103x60.png 103w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p>Now, create a new database for the staging site and import the data.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Go to your cPanel and find &#8216;MySQL Databases.&#8217;<\/li><li>Click on it and create a new database.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"202\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/MySQL-databases-on-cPanel.png\" alt=\"MySQL databases on cPanel\" class=\"wp-image-32697\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/MySQL-databases-on-cPanel.png 700w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/MySQL-databases-on-cPanel-300x87.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/MySQL-databases-on-cPanel-208x60.png 208w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Create a new user database table.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"386\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-new-user-for-database.png\" alt=\"how to Create a new user database table\" class=\"wp-image-32694\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-new-user-for-database.png 700w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-new-user-for-database-300x165.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/create-new-user-for-database-109x60.png 109w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>After creating the user database table, give that user access to the database.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"253\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/give-access-to-database-to-the-user.png\" alt=\"how to give user access to the database.\" class=\"wp-image-32695\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/give-access-to-database-to-the-user.png 700w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/give-access-to-database-to-the-user-300x108.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/give-access-to-database-to-the-user-166x60.png 166w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Go to phpMyAdmin and find the database you created.<\/li><li>Click on &#8216;Import&#8217; and select the file that you exported using the WP Migrate DB plugin.<\/li><li>Click on &#8216;Go&#8217; at the bottom of the page.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"520\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Import-the-database-on-phpMyAdmin.png\" alt=\"Import the database on phpMyAdmin\" class=\"wp-image-32696\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Import-the-database-on-phpMyAdmin.png 700w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Import-the-database-on-phpMyAdmin-300x223.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Import-the-database-on-phpMyAdmin-81x60.png 81w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_5_Edit_wp-configphp_on_a_new_database\"><\/span><strong>Step 5:<\/strong> Edit wp-config.php on a new database<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Check if the database prefix matches the one on your live site. If you are editing the &#8216;wp-config-sample.php&#8217; file, rename it to &#8216;wp-config.php.&#8217; Now you need to configure wp-config.php.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Open the wp-config.php from the subdomain you created.&nbsp;<\/li><li>Add the following lines:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>define( \u2018WP_HOME\u2019 , \u2018http:\/\/subdomain.domain.com\u2019 );\ndefine( \u2018WP_SITEURL\u2019 , \u2018http:\/\/subdomain.domain.com\u2019 );<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Upload it back to your server.<\/li><\/ul>\n\n\n\n<p>&nbsp;Note: Replace \u201csubdomain\u201d to your newly created staging domain and \u201cdomain\u201dto your original domain name.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_6_Restrict_Access_to_Your_Staging_Site\"><\/span><strong>Step 6:<\/strong> Restrict Access to Your Staging Site.<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Now, you should be able to log in to the staging site using your live website&#8217;s username and password.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Go to &#8216;Settings&#8217; on the left side panel.<\/li><li>Click on the &#8216;Reading&#8217; option.<\/li><li>Check on the &#8216;Discourage search engines from indexing this site.&#8217;<\/li><li>Save the changes.&nbsp;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"346\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Discourage-search-engines-from-indexing-site.png\" alt=\"Discourage search engines from indexing site\" class=\"wp-image-32702\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Discourage-search-engines-from-indexing-site.png 700w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Discourage-search-engines-from-indexing-site-300x148.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2020\/11\/Discourage-search-engines-from-indexing-site-121x60.png 121w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p>You can test the functionalities or any element of your site now.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Migrating_WordPress_Staging_To_Live\"><\/span>Migrating WordPress Staging To Live<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Many hosting providers allow you to push the changes of a staging site live at a click of a button. SIteground offers a <strong>one-click<\/strong><strong> staging<\/strong> solution with their GrowBig and GoGeek plans. However, once you have tested the functionalities and find they don&#8217;t have an issue, manually run the changes on your live site. This way consumes more time but is safe.<\/p>\n\n\n\n<p>There is another way to migrate WordPress staging to live.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>First, you need to create a duplicator package on your staging site.&nbsp;<\/li><li>Download the archives and installer on your computer.<\/li><li>Create a backup of your live WordPress.<\/li><li>Delete all the files and folders of your live site.&nbsp;<\/li><li>Import the staging site to your live server.&nbsp;<\/li><\/ul>\n\n\n\n<p><strong>Note<\/strong>: These steps are risky as your site can shut down even if you make a simple error. Proceed with the steps only if you know what you are doing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Q_What_is_WordPress_staging\"><\/span>Q. What is WordPress staging?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>WordPress staging is the process of creating a clone of your live site to test the changes, plugins, themes, or any other WordPress element. WordPress staging environment makes sure to keep your live site safe and free from any editing errors. We have mentioned easy methods on how to set up a WordPress staging site above. You can follow the steps to create your WordPress staging environment.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Q_What_is_a_staging_URL\"><\/span>Q. What is a staging URL?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>A staging URL is the location of your staging site. You can use it to preview how your site will look after you make certain edits on your staging site.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Wrapping_Up\"><\/span>Wrapping Up<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Setting up a WordPress staging site is very easy and useful. You can test unlimited features, functions, and much more in WordPress without worrying about any possible damage. We have mentioned two methods on how to set up a WordPress staging site.&nbsp;<\/p>\n\n\n\n<p>You can also opt for a <a class=\"rank-math-link\" href=\"https:\/\/rarathemes.com\/blog\/best-wordpress-hosting\/\">hosting provider<\/a> that offers you a build-in site staging option. This way is a lot easier and safer, as well.\u00a0<\/p>\n\n\n\n<p>Also, check out our articles on<a href=\"https:\/\/rarathemes.com\/blog\/wordpress-child-theme\/\"> How to create a child theme<\/a>.<\/p>\n\n\n\n<p>We hope you are now ready to start cloning your website and make the changes you need.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Editing your live site can be risky. You never know which edit might go wrong, especially when using a new theme, plugin, or feature. Such action can cause your whole &hellip; <\/p>\n","protected":false},"author":15,"featured_media":28632,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_be_single_description":"","_be_image_uploader":0,"_be_meta_button_label":"","_be_meta_button_url":"","_be_meta_button_newtab":false,"_be_meta_rel_attribute":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-28061","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","latest_post"],"_links":{"self":[{"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/posts\/28061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/comments?post=28061"}],"version-history":[{"count":0,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/posts\/28061\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/media\/28632"}],"wp:attachment":[{"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/media?parent=28061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/categories?post=28061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/tags?post=28061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}