Anytime you work on your site, especially if you are working on the files, running updates, or adding new features, you should never do it on the live site first. Bad things can happen. You should always test on a staging or development site before making the changes live.
Having a staging site is essential for testing updates, adding new plugins, or trying a new theme. It is like the “try it before you buy it” approach for your site.
First, find out if your hosting company has the ability to provide you with a staging site. If so, that is great! I know Flywheel, Pantheon, and WP Engine have the option for at minimum one staging site per live site. Flywheel and WP Engine will give you one staging instance. Pantheon can give you up to 10 multi-dev instances.
If your hosting company does not offer a staging site built within their system, never fear as there are other options you can use. They are simple or no configuration needed to get a staging site setup.
Plugins like WP Staging can offer you a temporary staging site built within your install. It offers a easy, no-configuration way of having a temporary staging site.
You can also setup a subdomain on your site to handle your staging needs in cPanel. You will go into your cPanel and find the Subdomains option. Name your new subdomain as staging (or whatever you would like). Then create a FTP account for your subdomain. This will help you to keep your sites separate. You can then upload WordPress to the staging site. You can then use a migration plugin to make a copy of your live site to move to the staging. You can use something like All-In-One WP Migration or Duplicator to move the site.
There are also local options you can use as well. Local instances go onto your computer and saved “locally”. One option is to use Desktop Server. Their paid version has Direct Deploy where you can push from your local instance to your live site. This is a great option for if you do not want to try to make the staging site on a cPanel.
Whichever you choose to do, it is always a great idea to test before you push live. Also remember to make a backup before running updates. Taking precautionary steps first, always ensures that if something breaks, it is not permanent.