It’s easy to botch up a live WordPress website, which is why an offline “local” web server is essential for testing, developing and backing up your work, lest disaster strike!
You wouldn’t change the tires of a speeding car or add an extra deck to a ship already at sea. It’s also best not to tamper with rockets hurtling through space.
Upgrades, maintenance, alterations and engineering always succeed when performed safely in an environment meant for research and development.
When you experiment in a safe place with the right tools the risks associated with crashing, sinking and exploding are mitigated. WordPress sites can be duplicated and adjusted, and then put back online to reduce the “old” version.
Build and Test Offline
If you’re new to the WordPress content management system, it’s useful to know how this particular type of website operates.
It uses something called a “database” to store text, images, software versions and configuration of plugins in rows and cells similar to a spreadsheet.
The database of a WordPress website is best modified offline.
- If you need to perform development to a site, make a copy of the site and set it up to run offline while you make changes.
- If you want to build a brand new WordPress website, build it offline and move it online once it’s complete.
- If you want to run tests or experiment with a site, do it offline.
Set Up Your Trusted “localhost” WordPress Pitstop
Let’s think about setting up our proverbial track-side work station away from the race. This is where we can tinker with the website, replace or upgrade engine parts and even paint it a different colour.
A Proverbial Child’s Sandbox for Testing…
To develop a website offline you’d use a development server called a localhost (yes, all one word) which simulates a live web server, only on your computer and in private. You could also regard a localhost as a child’s sandbox – a soft play area cordoned off from cyberspace; an opportunity for learning and experimentation without danger.
It’s okay to make mistakes here in the localhost, because no one but you sees the website. So, how do we create this so-called localhost?
Create a locahost with Free Software
WAMP is a free server stack is used for this very thing by most developers because of its relative ease of use. WAMP stands for Windows, Apache, MySQL, PHP. If you want a very simple portable server stack that does not need to be installed (it just runs from a self contained file) InstantWP is a good place to begin. If you’re a Mac user, you want the MAMP server stack.
Warning: Before You Hit the WordPress “Update” Button…
The WordPress core is a single piece of software developed by a company called Automattic and feeds millions of WordPress websites.
Periodically, you’ll receive update notifications in the WordPress dashboard prompted to you update to the latest version to patch security vulnerabilities and get new features or improvements.
Beware of Making Big Software Updates on Live WordPress Websites
The 44,000+ plugins available for WordPress all operate on the same principle – new versions of the plugins become available, just like those apps on your smartphone.
And guess what? Most webmasters, without thinking, hit the “update” button, assuming nothing can go wrong.
Sometimes, the updates complete without incident. Other times, their website “breaks” due to some incompatibility of software, whether it’s the WordPress core, a bad plugin or a coding mistake on the part of the webmaster.
Test, test, test. The importance of piloting major changes or just what seem like innocuous software updates offline and in safety cannot be emphasised enough.
The bigger the website, the higher the stakes. No one likes surprises; customers don’t like it when a website goes offline for extended periods and Google will eventually deindex your site if the 404 (page not found) status is prolonged.
Clone Online WordPress Site to Offline localhost
Whether you’re adding a shopping cart or an email contact form, do the right thing: test it offline first.
When you “move”, “copy” or “clone” a website to a localhost (or vice versa, where the site you built gets published to the public internet) you’re just making a copy of the website. You simply clone the contents of the WordPress installation (database and all the files and folders), and deploy it on your new server, whether that’s online of offline.
Have Everything Run Smoothly, Have Peace of Mind
It’s worth taking the time to do this because you’ll have the confidence and peace of mind knowing you’ve already tested changes or tweaks in safety. Potential disasters avoided!
The risks associated with “breaking” your site is a caveat of WordPress but a small price to pay considering how powerful, convenient and cost saving it is the rest of the time.