I love wordpress. It’s simple and very powerful. The only problem with it is the quality of the plugins and the constant upgrading. Like Microsoft Windows, sooner or later, something is going to break. Of course, I didn’t notice it until just recently.
On my blog (This blog), the newsfeeds broke. I really don’t know when it happened as it’s not in my nature to check my feeds every second of every day. They simply just weren’t working. Who knows why? I don’t. They just stopped.
Googling for the problem and a solution yielded many results of which nothing worked. It was time for a clean install (after 2 days of trial and error).
Yes, I could have restored a backup, but the reality of the whole thing was I might as well do a rebuild.
I doubt many users even noticed it happened.
Here’s what I did.
1. I copied the database to a secondary database (on the same machine) as well as copying the entire base directory.
2. I created a new virtual host and DNS name. We’ll just call it xyz.swimminginthought.com for now.
3. I troubleshooted on the copy which meant all the usual suspects.
4. I disabled all the plugins to see if the feed would come back. Needless to say, it didn’t.
5. I deleted everything in the directory except for the wp-content directory (but I did go into the plugins directory and deleted everything)
6. I downloaded a new version of wordpress and extracted it into the directory. This preserved my gallery content.
7. Restarted Httpd and checked the feed. (I know I didn’t need to restart httpd, but I did it anyway). Still, the feeds were broken.
This leads me to only one thing. The database.
Using the WordPress Export procedure, I exported separately into 2 files, the pages and the posts.
I deleted the database (of the work / test copy) and recreated it. Logging into WordPress for the first time (with a blank database allowed me to create a new installation). After this, I imported the posts file and checked the feed (xyz.wordpress.com/feed). It worked. I imported the pages afterwards.
Remember to go to your permalink structure and update it. Then just make a test post and publish it. (Check that your feed url actually sees it). Of course, it did.
This lead me to re-import the entire database (full dump and restore) to the new install to check the feed. Guess what? It broke again.
So back to deleting the database and setting it up, restoring posts, pages, and themes.
I realize now that it’s a setting in the database left over from some crazy and horribly written plugin or maybe an update that did some damage. Once I got the site to where I needed it, I exported the test database after setting the hostname / url back to swimminginthought.com and just reimported it to the production system.’
Guess what? The feeds are working again. So if you ever have that problem, don’t assume that disabling plugins one by one will solve the problem. I will never know what the issue was or is, but I can definitely say the restore of the database solved the problem. I simply reworked the database in a test environment and just restored over the old database and let’s not forget to re-enable the plugins one by one checking the feed after each plugin re-activation. You’ll find that there are many plugins that have outlived their usefullness. Just delete those as you’ll never need them. Each new version of wordpress adds functionality that plugins were originally there to fix.
So there you have it. The solution. Downtime? Zero.