On WordPress, Windows, Knowledge and Testing

I had an interesting conversation with a friend earlier today. It started with the persistent state of WordPress in some point of time, backing up and restoring a state after a failure, testing plugins here and there and keeping the site as useful, flexible and stable as possible at the same time.

The gist of that was the conflict between “keeping up and using the best tools” and “making the software fast and stable”.

Windows

I haven’t been using Windows for several years now, but I am supporting and maintaining my family’s hardware and software (and there is a Windows-specific software running on the machines). Windows has that thing called Windows Registry which is a hierarchical database for various configuration options for the operating system and all the software communicating with hardware devices or services from the OS.

The funky moment is when a piece of software is installed and uninstalled. Adding the new registry keys, libraries and services looks like that:

  1. we need to add these entries and install these libs/services
  2. for each of them, try to install
  3. if that entry already exists, skip (another software did that already)

It’s not uncommon for a software to introduce records that have been or will be used by other software later. What would happen if we want to remove the software?

  1. we need to remove these entries and deinstall these libs/services
  2. for each of them, try to deinstall/remove
  3. are we sure that this lib is not used by another software? Hmmm….

Due to the distributed and component-oriented architecture of an operating system (allowing for numerous tools to be installed on the top) it’s hard to decide when an entry is isolated and when that entry is required by another software.

You might have heard of registry cleaners, or other applications that address that sort of problem, but even they are unaware of all connections in the registry database and services (and they would rather skip some entry instead of breaking your OS due to a missing dependency).

If you have been following the Windows life cycle, then you would know that adding and removing random applications all the time leads to extra effort by the system to process all records and try to work with data that is likely not needed. There are abandoned services running in the background, lots of entries leading to slower registry search and data processing, empty slots on the hard drive (that require defragmentation of the hard drive) and so forth. Your system runs slowly, might get unstable (conflicting libraries) and insecure too.

WordPress

If you have Windows installed on your desktop or notebook and it has been running slow for a few months now, it’s quite possible that you are a victim of the scenario described above. If so, then you can keep using a slow computer, try to optimize it (success is not guaranteed) or reinstall and start again from ground zero.

How is WordPress related with all of this?

Try to substitute “Windows” above with “WordPress” and “software/tool” with “plugin/theme” and there we go – the Windows case all along!

Just as anyone (from the development industry) could build a piece of software for Windows, every PHP developer can craft a WordPress plugin. There are some professional tools, optimized and maintained as they should be, and some poorly coded solutions that stick to your install for the rest of it’s life. Adding random unknown plugins and themes just to test some new things on your live website would probably lead to conflicts, open security holes and significantly slow down your site. On the top of that, whilst your Windows is used by you only, your website is accessible by many visitors which affects their experience as well, and search engines would eventually prevent your site from hitting the top of the result pages as being slow and wasting time of other people.

Keeping it Clean

In practice, people want to try, to experiment, explore and research. Which is fine and admirable, as long as they know what is being sacrificed and what does the other side of the coin look like.

Technical Windows users who use their system as a playground could just reinstall their system every few months, whenever they add up too much extra load. Other users (everyone with enough system resources) could use a virtual machine such as VirtualBox which is the so called “sandbox” for you to play with something on the side, experiment without causing the core system to fail, and then reinstall as a separate process. This facilitates testing, doesn’t directly affect the core install, and is easily replaceable (at least takes less time to start from scratch for the entire system). Or use Linux alternatively. 🙂

What could a WordPress user do to get the best of both worlds?

  1. Use a local install for testing – if you are technical enough to set up a web environment locally and install WordPress, that’s your best shot. Fast local access to WordPress, easy to set multiple installs, no remote users sniffing around.
  2. Use a separate server install for testing – if you have a hosting server with Fantastico or Softaculous, you could easily set a new WordPress install just with a few clicks and test there. The access could be restricted for remote users with a plugin or .htaccess rules, and you can play on a live site with all the themes and plugins you want, then remove the install from the server.
  3. Backup – regularly backup your WordPress website. Install an automated backup plugin, manually do backups before installing new plugins and try to get an extra backup from your hosting provider. That never hurts and it is better to have several copies than relying on one or two that might fail for some reason (trust me, that happens occasionally).
  4. Install only what you really need on your site – when you have played with the sandbox, go ahead and install what you really need on your site. Don’t add everything there if you don’t need it. Try to install proven software by recognized plugin/theme authors with a high rating. Check the support forums first to ensure that it’s fairly stable and maintained.
  5. Start again – at some point your website could still need a revamp, whenever you have tested too many things over the months/years or just need to drop many essential features, run a new, simpler theme and keep the content. Consider starting from scratch – a clean install with the theme, migrating only the content, getting a fast and stable website again.