{"id":7541,"date":"2020-05-27T15:00:08","date_gmt":"2020-05-27T13:00:08","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=7541"},"modified":"2020-10-30T16:23:43","modified_gmt":"2020-10-30T15:23:43","slug":"how-to-setup-wordpress-staging-site","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/how-to-setup-wordpress-staging-site\/","title":{"rendered":"How to Create a Staging Environment for Your WordPress Site"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]Have you ever seen a white screen instead of your site after making a change or adding a plugin? Have you ever thought <em>If only I\u2019d had a testing environment where I could have tried this out instead of crashing my website<\/em>? If the answer to either of those is yes, then this article is for you.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To avoid mishaps like these, you should <strong>always test-run any changes you want to make in a staging environment and not on your live website<\/strong>. In this article, we\u2019re going to show you how to create a staging environment for your WordPress website so <strong>you will be able to safely test or try out any changes<\/strong> before applying them for real.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]We will touch on the following methods you can try:[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#via-wordpress-hosting-options\">Creating a staging site via WordPress hosting options<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#using-a-3rd-party-plugin\">Making a staging site using a 3rd party plugin<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#manually\">Creating a WordPress staging site manually<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;70px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">What Is Staging and What Does It Do?<\/h2>\n<p>[\/vc_column_text][vc_column_text]<strong>A staging site is essentially a copy or clone of your live website<\/strong>. However, a staging site is <strong>not available to the wider public<\/strong>; it\u2019s only accessible to you and any changes you make to it won\u2019t show up on your live website. This means <strong>you can test any changes without risking or crashing your live site<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Another reason to have a staging environment is to <strong>avoid problems caused by different server configurations<\/strong>. When building sites, many users will first install WordPress locally on their computers. For the local installation to work, they use server emulators for Windows or Mac. This lets them <strong>do their testing offline before launching their site<\/strong>. However, when the time comes to launch the site, you might end up with a problem because of server configuration differences. Simply put,<strong> the local and live servers might not have all the same settings<\/strong>. But, using a staging site, which would be on the same server as your live site, will help you avoid issues with server configuration compatibilities.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">How to Create a Staging Site in WordPress<\/h2>\n<p>[\/vc_column_text][vc_column_text]There are several ways to create a staging site and, fortunately, none of them require you to be very tech-savvy.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Most leading WordPress hosting providers will offer you the option to create a staging site with a few clicks as part of the hosting package. However, if your provider isn\u2019t one of them you still have alternatives. <strong>You can use a plugin to make a staging site or create one manually<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"via-wordpress-hosting-options\"><\/a>Creating a Staging Site via WordPress Hosting Options<\/h3>\n<p>[\/vc_column_text][vc_column_text]If you\u2019ve already bought hosting for your site, then this is the simplest method to try. Leading WordPress hosting providers, like SiteGuard, WP Engine, Bluehost, etc. all include built-in staging site features. So setting it up will only take a few clicks as all the options and tools you might need should already be included in your hosting plan.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Now, since the actual step-by-step procedure here can differ from provider to provider, <strong>we suggest reaching out to your hosting provider<\/strong>. Ask them for information about accessing the feature and using it then just follow their instructions.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"using-a-3rd-party-plugin\"><\/a>Making a Staging Site Using a 3rd Party Plugin<\/h3>\n<p>[\/vc_column_text][vc_column_text]In case your hosting provider isn\u2019t offering staging site features, you can use a plugin. <strong>Several plugins on the market can help you<\/strong>, such as Duplicator, WP Staging &#8211; DB &amp; File Duplicator &amp; Migration plugin, All-in-One WP Migration, WP Stagecoach, BlogVault&#8230; <strong>Any of them can help you create a staging site with a few straightforward steps<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Before we proceed we need to stress that <strong>there are a few drawbacks to this method<\/strong>. Keep in mind that <strong>whichever plugin you choose may only have limited control<\/strong> over the server which means it might not provide the best results. Also, some plugins create a staging site using their server(s) so you should inquire about their privacy and data protection policies in advance.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Now we\u2019re going to show you how to make a staging site using the <a href=\"https:\/\/wordpress.org\/plugins\/wp-staging\/\" target=\"_blank\" rel=\"noopener noreferrer\">WP Staging \u2013 DB &amp; File Duplicator &amp; Migration plugin<\/a>. To start, you need to <strong>install and activate the plugin<\/strong>. Then <strong>find the plugin options in your WordPress admin menu<\/strong> (depending on your other installed plugins, this one should be near the bottom) and open <em>Sites\/Start<\/em>. Then click on <em>Create new staging site<\/em>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/1-WP-Staging-plugin.jpg\" class=\"attachment-full size-full\" alt=\"WP Staging plugin\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/1-WP-Staging-plugin.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/1-WP-Staging-plugin-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/1-WP-Staging-plugin-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Next, you need to <strong>add a name for your staging site<\/strong>. We used staging but you can pick whatever name you like. Then just click on <em>Start cloning<\/em>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/2-Start-cloning.jpg\" class=\"attachment-full size-full\" alt=\"Start cloning\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/2-Start-cloning.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/2-Start-cloning-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/2-Start-cloning-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]The <strong>process can take some time depending on the size of your site<\/strong>, so just wait until you see the notification that the process has finished successfully.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/3-Process-has-finished-successfully.jpg\" class=\"attachment-full size-full\" alt=\"Process has finished successfully\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/3-Process-has-finished-successfully.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/3-Process-has-finished-successfully-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/3-Process-has-finished-successfully-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>To access your newly created staging site just click on the access link and log in<\/strong> using the same information you use for login to your live site. Keep in mind only admin-level users will be able to access the staging site.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If you are unable to access your staging site for any reason or if you get an error notice then you should consult the <a href=\"https:\/\/wp-staging.com\/docs\/copy-staging-site-to-live-site\/\" target=\"_blank\" rel=\"noopener noreferrer\">plugin documentation<\/a>.[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][vc_empty_space height=&#8221;81px&#8221;][vc_separator color=&#8221;custom&#8221; accent_color=&#8221;#f0f0f0&#8243;][vc_empty_space height=&#8221;50px&#8221;][vc_widget_sidebar sidebar_id=&#8221;top-picks-banner&#8221;][vc_empty_space height=&#8221;28px&#8221;][vc_separator color=&#8221;custom&#8221; accent_color=&#8221;#f0f0f0&#8243;][vc_empty_space height=&#8221;84px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"manually\"><\/a>Creating a WordPress Staging Site Manually<\/h3>\n<p>[\/vc_column_text][vc_column_text]Creating a staging site manually is a method <strong>you should try only if you are a more advanced WordPress user<\/strong>. It requires more technical knowledge compared to the other two, so it may be challenging for beginners. However, <strong>using this method will give you the greatest control over the process of creating your staging site<\/strong>. On the other hand, you should keep in mind that, with manual creation, you will have a final step where you deploy the changes from your staging environment to the live server. <strong>During this move, your live site will be unavailable<\/strong>. We will touch on this later as well.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To manually create your staging site, <strong>you first need to create a subdomain for it<\/strong>. Log in to <em>cPanel<\/em> (or the platform you use to access the server) and find the <em>Domains<\/em> section, then select <em>Subdomains<\/em> from there. We\u2019ve included screenshots, and while the actual look of your cPanel dashboard may be different from ours, the options it has are always the same.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/4-Subdomains.jpg\" class=\"attachment-full size-full\" alt=\"Subdomains\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/4-Subdomains.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/4-Subdomains-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/4-Subdomains-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Once the new window is open, you need to create a subdomain. We called ours staging but the name is entirely up to you. Click on the <em>Create<\/em> button and your hosting\u2019s control panel will do the rest.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/5-Create-a-subdomain.jpg\" class=\"attachment-full size-full\" alt=\"Create a subdomain\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/5-Create-a-subdomain.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/5-Create-a-subdomain-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/5-Create-a-subdomain-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Now you have a staging environment where you can import your live website. <strong>You have two options for import<\/strong>\u2014<a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-use-ftp\/\">using an FTP client<\/a> or using a plugin.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If you use FTP, we suggest you <strong>create an FTP account you\u2019d use just for your staging site<\/strong>. You can easily do this via the <em>FTP Accounts<\/em> option in cPanel. Set your login information in the new window (the Domain was automatically generated during subdomain creation\u2014you can find it in the field <em>Document Root<\/em> as shown above).[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/6-Add-FTP-Account.jpg\" class=\"attachment-full size-full\" alt=\"Add FTP Account\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/6-Add-FTP-Account.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/6-Add-FTP-Account-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/6-Add-FTP-Account-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Now you can <strong>continue the process of importing your live website<\/strong> using the <a href=\"https:\/\/wordpress.org\/plugins\/duplicator\/\" target=\"_blank\" rel=\"noopener noreferrer\">Duplicator plugin<\/a>. Install and activate the plugin. Once you\u2019ve done that, find the settings for it in your WordPress admin menu and open them. Then locate and click the <em>Create New<\/em> button.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/7-Duplicator-Packages.jpg\" class=\"attachment-full size-full\" alt=\"Duplicator Packages\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/7-Duplicator-Packages.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/7-Duplicator-Packages-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/7-Duplicator-Packages-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;60px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/8-Locate-and-click-the-Create-New-button.jpg\" class=\"attachment-full size-full\" alt=\"Locate and click the Create New button\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/8-Locate-and-click-the-Create-New-button.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/8-Locate-and-click-the-Create-New-button-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/8-Locate-and-click-the-Create-New-button-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Then, in the new view that opens, name your package and select <em>Next<\/em>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/9-Select-Next.jpg\" class=\"attachment-full size-full\" alt=\"Select Next\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/9-Select-Next.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/9-Select-Next-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/9-Select-Next-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Now the <strong>Duplicator plugin will start its scan wizard to check if everything is alright<\/strong> so the process can continue. If the scan results are marked as <em>Good<\/em>, then you can tick the confirmation box and proceed by clicking on <em>Build<\/em>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/10-Scan-wizard.jpg\" class=\"attachment-full size-full\" alt=\"Scan wizard\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/10-Scan-wizard.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/10-Scan-wizard-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/10-Scan-wizard-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Depending on your site size, this process may take some time. <strong>Wait until a notification with <em>Package Completed<\/em> has appeared<\/strong>. This package will contain copies of all your live site files and folders. You need to download it. We suggest <strong>selecting <em>One-Click Download<\/em> as it will create a .zip archive containing both the Installer and Archive files<\/strong>. Now just save it to your computer.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/11-One-Click-Download.jpg\" class=\"attachment-full size-full\" alt=\"One Click Download\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/11-One-Click-Download.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/11-One-Click-Download-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/11-One-Click-Download-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>Make sure the download includes both the installer and archive files<\/strong>; you will need both for upload to the staging site. Then you can <strong>upload the package to the staging environment<\/strong>\u2014the subdomain you\u2019ve made earlier\u2014using an FTP client or via cPanel and unpack it.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]But, before you can do anything with the downloaded package, <strong>the staging site will need a database<\/strong>. To create one, go to cPanel and find the <em>Databases<\/em> section. Then select<em> MySQL Databases<\/em>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/MySQL-Databases.jpg\" class=\"attachment-full size-full\" alt=\"MySQL Databases\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/MySQL-Databases.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/MySQL-Databases-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/MySQL-Databases-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]A new window will open where you will need to <strong>create a name for your database<\/strong>. We called ours staging, but this is entirely up to you. Click on <em>Create Database<\/em>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/13-Create-Database.jpg\" class=\"attachment-full size-full\" alt=\"Create Database\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/13-Create-Database.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/13-Create-Database-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/13-Create-Database-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Now that that\u2019s done, you need to <strong>create a user for your database<\/strong>. Staying on the same cPanel page, scroll down until you reach MySQL Databases, then find the <em>MySQL Users section<\/em>. Next, <strong>create a profile by setting a username and password and then choosing <em>Create User<\/em><\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/14-Create-a-profile.jpg\" class=\"attachment-full size-full\" alt=\"Create a profile\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/14-Create-a-profile.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/14-Create-a-profile-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/14-Create-a-profile-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]After you create a user you need to <strong>connect them to the database<\/strong>. On the MySQL Databases page find the <em>Add user to database<\/em> option. Select the newly created user and the staging database then click on <em>Add<\/em>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/15-Add-user-to-database.jpg\" class=\"attachment-full size-full\" alt=\"Add user to database\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/15-Add-user-to-database.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/15-Add-user-to-database-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/15-Add-user-to-database-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]After that, you need to <strong>assign privileges for your new user<\/strong> that include access to and modification of the database. In the <em>Manage User Privileges<\/em> section simply tick the checkbox with <em>All Privileges<\/em> and click on the <em>Make Changes<\/em> button.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/16-Manage-User-Privileges.png\" class=\"attachment-full size-full\" alt=\"Manage User Privileges\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/16-Manage-User-Privileges.png 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/16-Manage-User-Privileges-300x160.png 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/16-Manage-User-Privileges-620x331.png 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Now your database is ready to be used for your staging site.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]For the next step, open a new tab in your browser and type in your subdomain address followed by a forward slash and the <em>installer.php<\/em> words. The result should look something like this:[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<em>https:\/\/yoursubdomain.com\/installer.php<\/em>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Of course, this is just an example and you will need to replace <em>yoursubdomain.com<\/em> with your actual subdomain address. Once you do that, you will<strong> run the Duplicator plugin\u2019s installer wizard which will search for the Archive file that you previously uploaded to the staging site<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/17-Installer-and-Archive.png\" class=\"attachment-full size-full\" alt=\"Installer and Archive\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/17-Installer-and-Archive.png 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/17-Installer-and-Archive-300x160.png 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/17-Installer-and-Archive-620x331.png 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Don\u2019t forget to <strong>tick the box with the terms<\/strong> and notices as you won\u2019t be able to proceed to the <em>Next step<\/em> without it.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]During the next step, <strong>the wizard will ask you to fill in your database information<\/strong>. You can leave the first two fields as they are\u2014Action: Connect and Remove All Data and Host: localhost. But <strong>you need to fill in the Database, User, and Password fields<\/strong> with the same information you set during staging database creation. If you\u2019re not sure you added the right login information, you can click the <em>Test Database<\/em> button to <strong>check if the information you\u2019ve added corresponds to an existing database<\/strong>. If everything is ok you will get green results under the Validation section. Then you can proceed to the <em>Next step<\/em>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/18-Connect-and-Remove-All-Data.jpg\" class=\"attachment-full size-full\" alt=\"Connect and Remove All Data\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/18-Connect-and-Remove-All-Data.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/18-Connect-and-Remove-All-Data-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/18-Connect-and-Remove-All-Data-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]The plugin will then unpack the .zip archive and upload your website database copy into the newly connected staging site database. At the same time, it will a<strong>utomatically detect the URL and subdomain path<\/strong>\u2014you just need to make sure it\u2019s right before proceeding.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]In case the automatic detection fails, you can <strong>add the URL and subdomain path manually<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Once you\u2019ve done that, click on <em>Next<\/em> and the Duplicator will finish the migration of your site copy to the staging environment on the server.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/19-Finish-the-migration.png\" class=\"attachment-full size-full\" alt=\"Finish the migration\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/19-Finish-the-migration.png 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/19-Finish-the-migration-300x160.png 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/19-Finish-the-migration-620x331.png 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]When the migration is complete, click on the <em>Admin Login<\/em> button to log in to your staging site\u2019s WordPress dashboard. The <strong>login here will be the same one you use to access your live site<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/20-Click-on-the-Admin-Login-button.png\" class=\"attachment-full size-full\" alt=\"Click on the Admin Login button\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/20-Click-on-the-Admin-Login-button.png 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/20-Click-on-the-Admin-Login-button-300x160.png 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/20-Click-on-the-Admin-Login-button-620x331.png 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Now that your staging site is up and running and even though it\u2019s not visible to the public,<strong> you should still give it an added layer of protection<\/strong>. You can do that by creating a password for access to the subdomain.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Go to your cPanel dashboard and find the <em>Directory Privacy<\/em> option in the <em>Files<\/em> section.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/21-Directory-Privacy.png\" class=\"attachment-full size-full\" alt=\"Directory Privacy\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/21-Directory-Privacy.png 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/21-Directory-Privacy-300x160.png 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/21-Directory-Privacy-620x331.png 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]After that, find the subdomain you created for your staging site and tick the <em>Password protect<\/em> this directory checkbox. Then <strong>enter a name for the directory you want to protect and pick a username and password<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/24-Password-protect-this-directory.jpg\" class=\"attachment-full size-full\" alt=\"Password protect this directory\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/24-Password-protect-this-directory.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/24-Password-protect-this-directory-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/24-Password-protect-this-directory-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Click on <em>Save<\/em> to activate the new security measure for your subdomain.<strong> Now your staging site will be protected and hidden<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]And you\u2019re done! All that\u2019s left now is for you to <strong>start testing changes and modifications to your site<\/strong> in its fully operational staging environment without having to worry that your live site will suffer in any way.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<strong>Bonus Tip<\/strong>[\/vc_column_text][vc_column_text]Sometimes your staging site, a perfect copy of your live site, can negatively impact your SEO and SERP position. To avoid that, <strong>you should make your site non-indexable<\/strong>. You can do this by going to your staging site\u2019s WordPress admin dashboard and then to<em> Settings &gt; Reading<\/em>. Find the option <em>Discourage search engines from indexing this site<\/em> and tick the box next to it. This will <strong>automatically add a noindex tag to your entire staging site<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/23-Discourage-search-engines-from-indexing-this-site.jpg\" class=\"attachment-full size-full\" alt=\"Discourage search engines from indexing this site\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/23-Discourage-search-engines-from-indexing-this-site.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/23-Discourage-search-engines-from-indexing-this-site-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/05\/23-Discourage-search-engines-from-indexing-this-site-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;82px&#8221;][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Transferring the Staging Site Back to Live<\/h3>\n<p>[\/vc_column_text][vc_column_text]When you finish testing, <strong>all the same steps you took to make a staging site are used in reverse to migrate it to live<\/strong>. Using the Duplicator plugin, make a package (or download separate Installer and Archive files) containing your staging site files with all the changes you made, and save it to your computer.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]At this point, it\u2019s always a good idea to <strong>make sure you have a backup of your live site<\/strong> (e.g. the package you uploaded to your staging environment). If you don\u2019t have one ready, you can <a href=\"https:\/\/qodeinteractive.com\/magazine\/wordpress-backup-with-updraft-plus-plugin\/\">make a backup using a plugin<\/a> or even <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-manually-backup-wordpress-website\/\">backup your website manually<\/a>. <strong>Backing up your site ensures that you can restore it if anything goes wrong<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]So, after you\u2019ve made sure that you have a backup, <strong>delete all of your live site files and folders<\/strong>.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Then <strong>upload the Installer and Archive files from your computer via cPanel or an FTP client<\/strong>. Since you had to delete all files, your live site will, naturally, be down while you upload everything from your staging site. Depending on your internet speed, server settings, and site size the upload might take some time (ideally a few minutes, but don\u2019t worry if it takes longer), just wait until it\u2019s done.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]When the files have finished uploading, <strong>just follow the steps in the Duplicator Wizard to the end to finalize your live site import<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Final Thoughts<\/h2>\n<p>[\/vc_column_text][vc_column_text]Creating a staging environment can be essential if you are developing WordPress websites. And it is extremely useful for anyone who wants to safely make changes to their site. As we\u2019ve seen, there are several ways you can use to make a staging environment. The simplest and most user-friendly method will always be to use the built-in options available via your hosting control panel. We advise you to opt for that as it\u2019s also the most reliable and time-efficient option you can use. If your hosting provider doesn\u2019t offer this possibility, then try the other methods but keep a backup of your site at hand and find out how to restore it from backup.[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Whether you need to make changes or run tests, having a WordPress staging site will allow you to work without risking your live site.<\/p>\n","protected":false},"author":10600,"featured_media":7714,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[14,4,13],"class_list":["post-7541","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-core","tag-tips","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/7541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/10600"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=7541"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/7541\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/7714"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=7541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=7541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=7541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}