Sometimes you get the bear, sometimes the bear gets you.
As someone that is so interested in technology and spends most of his waking life trying to bend tech to his will, it may come as a surprise that occasionally, even I make stupid mistakes with technology.
I know, I know… It can’t possibly be true. Surely there was a bug or a fatal flaw in the technology that caused the problem rather than something I’d done or not done as the case may be.
No, sadly – I screwed up.
Allow me to fill you in… Grab a soft drink and some snacky things if you’re so inclined, I’m happy to wait.
Ok, here we go…
In December 2015 when I was looking for a theme to use for Casual Marketer, I cruised through my usual suspects – StudioPress and Elegant Themes but I broadened my scope to include things like Thesis and even OptimizePress.
I ended up settling on Extra by Elegant Themes because it was built atop the Divi Builder plugin and I’d always really like Divi. Extra kind of had the basic look and feel that I wanted so other than toying with some colours and tweaking a bit of CSS I was good to go.
If you’re not familiar with Divi, it’s a page builder plugin that uses drag and drop, pre-canned modules of functionality to make it easy to layout pages and get them looking the way you like – I’d used Divi before a few times and always like it.
The cost wasn’t really an issue because I pretty much own everything, so my choices were more about personal taste and functionality.
One of the really big considerations for me, as I’ve stated a few times, is that I wanted it to be very fast to create posts on the Casual Marketer site. As I wanted to take these daily emails, tweak them a bit and post them on the site as a blog post without too much fussing about. The Divi Builder has a feature that allows you to create re-usable layouts for posts as well as pages, so I effectively turned my blog post layout into a template. I load the layout, tweak some of the settings, paste in the content to the right box and that’s pretty much it.
Remember this part about it being faster and using a templated layout for my posts, this will be important.
I’m going to take a second and explain how these page builder plugins work because they are very powerful (and dangerous) and to people who are new to WordPress, they can appear to be a form of sorcery.
What the page builder is doing is it’s allowing you to layout your page, usually graphically and as you do, in the markup of the underlying page it’s injecting shortcodes into the content. Then when the page is rendered, the plugin interprets the shortcode and displays it accordingly. In essence, these things are generating HTML, CSS and some PHP to make your page look how you want it to look without you needing to worry about any of that underlying complexity.
The problem generally comes with most of these builders is that when you turn them off or change themes they don’t remove their shortcodes. That means your content is littered with these shortcodes that your new theme and WordPress don’t know anything about – it’s content pollution.
It can get worse.
In the case of Divi (and to be fair some other page builders) if you create your content INSIDE one of their modules, when you turn off the builder the content is gone too. Let me repeat that again, the content disappears.
That’s pretty bad, but you can export your content and while it will have those ugly shortcodes, you’ll at least have the content. For pages, this isn’t so bad because if you have a blog, most of your content will be in posts rather than pages.
Except, if you’ll recall above, you’ll remember that I said I used the builder to create a template for my blog posts.
Yeah, every single blog post is impacted on my site.
Now, this isn’t Elegant Themes’ fault, this is how builders work for the most part and the way I set it up, I exacerbated the problem. In fact, it’s a well-known issue and it’s my fault for not thinking about what I was doing and investigating it a bit more. People actually say online, “Well, nobody would be stupid enough to use this kind of builder for blog posts, so the damage is limited.”
This guy right here was stupid enough. High fives all around.
I picked up on my mistake about a month ago when I was poking around with Divi 3.0 and looking at some of the features. I saw a post in their forums from a user asking if they had a tool to help you migrate away from Divi and as I was reading it became clear the situation I was in.
This is going to sound crazy, but luckily, I’m months behind on updating the blog! The last post was from April 11th and so I’m like 150 posts behind. If I had updated it religiously my situation would be catastrophic, it would take months to fix. This is one of those few times in life where laziness is a blessing.
Here’s the funny part of this whole situation. Building out the template and pre-canned layout for my blog posts turned out to actually be pretty slow. My logic was sound – create a layout for my posts that had all the right things in the right places and then just copy and paste the email content into the right box and we’re done.
Except it was really slow, which contributed to why I didn’t want to do and it was so finicky that it was nearly impossible to teach someone else how to post the content for me.
So to summarize – I used a theme that through no fault of the people who made it, I created a slower process to post my stuff with and did so in a format that makes it difficult to fix.
Good job, Sean.
My strategy to fix it, which I’ve not yet tested, is going to be to export all of my posts to a text file of some description. Inside that text file, the post content will be filled with shortcodes polluting the content. I’m going to write a script that will process that file and strip out the pollution automagically and re-save the text file without it, thus cleansing my content to some degree.
The hard part, of course, is going to be selecting a new theme, customizing it and getting it ready to use. Once that’s done I’ll have to figure out how to re-insert all of the content back into the right posts and link the media files back up.
This will be no small feat and it will undoubtedly take a few weeks to complete – I’m going to be honest, I’m not looking forward to it. At this point, I don’t have a plan on when I’m going to actually do it, but I want to get it done before the end of the year, so I imagine I’ll embark on it next month at some point.
As I sat around today thinking about this email, I tried to think of what the lesson for you to take away might be. My mind kept gravitating towards things like, “doing more research” and “don’t overcomplicate your technology”, but honestly, sometimes things like this just happen.
It sucks, but that’s life.
What I came to a landing on for myself and the best thing I can offer you is to say, when you make a bad decision or you screw something up, the best thing to do is bite the bullet and rip the band-aid off quickly. You just can’t dwell on a mistake like this, it happens to all of us from time to time and you just need to figure out what you need to do to fix the problem and move forward.
Sean’s Update, January 2018 – Not only did I successfully migrate from Divi to Studiopress, but on January 2nd, 2018, I decided to migrate away from Studiopress to GeneratePress because it’s easier to work with, displays better on mobile and renders pages faster. The decision to leave Divi was a good one because the migration from Studiopress to GeneratePress only took three hours.