Site icon Paradite

Fixing WordPress Image Sizes missing issue on Ubuntu 16.04

While I was trying to upload some new photos onto my blog, I realized that all my photo sizes are gone. I use different sizes in blog posts and final tiles gallery as my portfolio so they are pretty important for me.

Uninstalling Simple Image Sizes and WP Smush did not help. Updating WordPress and all plugins to the latest did not help as well. So it had to be my Upgrading Ubuntu 14.04 to 16.04 for WordPress that messed it up.

After messing around on WordPress UI, I found another strange issue where my image editor inside the editor is also not working. So it might be related to some low-level libraries? I dug deeper and found someone with a similar issue:

The fix provided was for php 5, but on Ubuntu 16.04, neither php5-gd nor php5-imagick was available. So I went ahead and installed the latest version of php – php 7.3 following the Digital Ocean guide, with some minor tweaks:

And… of course, my WordPress homepage started crashing.

A quick sudo nano /var/www/wp-config.php to turn on debugging mode and I found out that the old Crayon Syntax Highlighter plugin stopped working with new php 7.3 syntax. There is manual fix online but I thought there has to be a simpler way. Following the issue on the original author aramk’s GitHub repo, I found a replacement plugin called Urvanov Syntax Highlighter (code repo on GitHub). Activating it fixed the error, but it didn’t seem to transfer the existing themes. So more bash scripts to the rescue:

Now everything works again (hopefully)!

Exit mobile version