Tonight, during a scheduled server move, I decided to clean install my WordPress installation for my personal blog.
Weighing the pros and cons of doing this, I’m glad that I did it… but only on my personal blog.
For one, I finally deployed full (and enforced) SSL using Let’s Encrypt. Complete with 301 redirects in my .htaccess file for older links. I’ll spare you the debate as to if it really is helpful for a blog to have SSL, but there is no question that Google gives tie-breaking credit to SSL-enabled sites in the SEO game, and that’s good reason enough to just do it.
For two, speed. I had to manually re-enable each plugin, and found four or five plugins that really didn’t make any sense to keep. I had a redirection plugin meant for some old URLs that, while relevant five years ago, are worthless today. That one plugin had to run each and every time someone even pinged my site, to see if it should invoke a redirect. My blog is now faster than ever.
This is in-part due to the massive SQL cleanup that I got from doing a clean install. WordPress old plugins, especially very old plugins, do not remove their tables when being uninstalled. This massively bloats the MySQL database, particularly with older plugins that made table entries based on each visit, comment, or article.
For three, readability. I noticed a couple of quick formatting changes on mobile that should make it easier to read.
For four, inspiration. I also noticed a few key things that I’d like to change when I have more time.
In sum, time consuming. To clean install a WordPress site, you have to use the WordPress Export tool, and then restore all your plugins and theme settings manually. Many crib notes or A/B comparisons are required to pull this off. See, WordPress does a great job of storing posts, comments, and making sure that (once permalink structure is restored) that everything plugs back in where it should… for WordPress Core content.
For non-core stuff, that’s where it gets messy. Each and every plugin I use, had to be reset.
Frankly, this wouldn’t be possible on some of the sites that I admin partially or full-time. The plugins are so tightly integrated into the MySQL tables, that it wouldn’t be possible to move with a clean install – at least, not without massive non-trivial SQL copy-and-pasting.
The only “mission critical” things that I would wish the WordPress Import tool would restore, is Core settings. There are some key settings like permalink configuration, that should survive importation. Otherwise, backlinks would break. One might forget that in a crisis (say, restoring an emergency backup), and not remember to reset that setting. Same with name, tagline, etc.
In a perfect world, WordPress would have a container system in its Export tool for plugin and theme data. That way, when you run the WordPress Import tool, it could simply pull down all the plugins (say, from WordPress Codex), and then restore the plugin database data all in one step.
That would take a lot of effort, but it would finally free us from WordPress backup tactics. Then, one could simply run WordPress Export, and have a true-and-complete WordPress backup of their site. Restore your theme (if unique), any unique plugins, and run the Import tool… and that’s it.
In sum, what I thought would take one to two hours, wound up taking four hours. Arguably my biggest regret was once started, I really couldn’t stop – and would have done this at a different time had I know how long it would have taken.
Finally, the how-to clean install is just as important. If you do it out of order, you can lose your image library history, which is really, really bad.
Start by clean installing WordPress. Run the setup tool and define the admin account. Then, do not run the WordPress Import tool. Instead, restore your wp-content tree, and any other WordPress files via (S)FTP. Then run the WordPress import tool. Finally re-enable and re-configure each of your plugins.
Also worth double checking your permissions, as WordPress file uploads and other items can break otherwise!
What this does, is ensure that when the WordPress image tool begins querying all the images, it won’t 404 and purge them as missing. I had to re-upload a couple of images, from scratch, to get them back in the image library – they were absent from the excepts and featured images on my homepage. Had I done it properly, as described right above, that wouldn’t have happened.