Why you should not play with a live WP site

I do most of my experiments on this blog. Whereas most of the experiments are on content and digital marketing, some tend to be technical.

Yesterday, I was trying out the exceptional Pods framework on my blog. In my haste to try out Pods, I skipped setting up a locally hosted WordPress stack and opted to install it on this blog instead.

After the install, Pods has a pretty cool interface for adding Custom Post Types, Custom Fields and relationships between them. I might think about using this in some production sites in the future.

Once I was done, I thought that it was high time I cleaned up my act and delete the plugin. So I started deleting the Pods … I also accidentally deleted all my posts!!

Today, I noticed a small slump in my traffic and I checked my home page.

All your posts belong to us

All my posts (written over 7 years or so) were gone. None of them remained. After the initial cold dread gripped me of what I had done, I started looking at database back-ups.

Luckily, I had iThemes setup to create back-ups every two days and the plugin had backed up my database hours before I started my shenanigans.

All said and done, I was quickly able to restore my older database without any loss in work :)

Lessons to be learnt

Never experiment on a live WordPress stack. This might seem obvious, but sometimes in order to save time we sometimes get tempted to just install a plugin and deactivate it later on … however, are we aware of what havoc it causes in the db when we activate/deactivate the plugin?

Folks who have been blogging on WordPress for quite some time would know what I am talking about. WordPress comes with a total of 11 tables. After 7 years, I have more than 40 tables in my database.

Clearly, it needs cleaning up. However, I won’t play with the live db again.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.