Many users or wordpress site adminisrators/owners would like to make changes or modifications to their wordpress site wihout visitors not seeing changes until site is pushed to live. Here the steps to take to get it done.
1.Create The WordPress Staging Environment
Login to your cpanel account(https://yourdomain.com/cpanel), locate wordpress from softaculous app installer.
This will bring you to your wordpress installation in softaculous, scroll down till you see your wordpress installation.
Click on “Create staging” icon under “options“.
Next, you will have to choose a directory you would want to have your staging website. You can change Database name but make sure not to forget it in case you would like to make some manual changes there.
Hit on “create staging”
Congrats!!, Your staging environment is now complete!, you can now check the url of staging site and also admin url to start mking your changes and modifications.
2. Push Your Website Live
Once you have completed all your changes, you can then push the staging area to your live WordPress website.
To do this, you’ll want to follow the same steps listed above to access the Softaculous apps installer (cPanel -> WordPress).
You will now notice another installation in the menu:
Now hit the “Push to live” button under “options“. This takes you to the next screen with two options:
1.Default(Highly Recommended)
2. Customize
The default options will replace all the files of your live installation with the ones in Staging installation and will erase the live database and import the database from your staging installation.
If you’re good with that (what most will want to use) you can click the “Push to Live” button.
Once finished, you’ll see a screen like this:
Congratulations!!!, your website is now updated with the changes made in the staging environment!
You’ll want to inspect your website now and make sure you’re not getting errors. Some plugins added in the staging environment may create an error 500, so you may need to temporarily remove it and re-install it to get rid of the error. You can check this in the ERROR_LOG file within the directory where WordPress is located.
3. Delete The Staging Environment
Once you are satisfied with all of your changes and are finished with the staging environment you will want to remove it from the server.
It’s a huge security risk to leave WordPress installations not used/updated on your web hosting account.
Head back to wordpress installation under softaculous app installer:
Delete(click the red X) the wordpress staging you created.
DONE!!!!!