WordPress Woes Here in 2016

Old (-ish) server equipment, old (very, no ish about it) PHP v5.3.xx and WordPress version 4.xx don’t work together.  Period.  Don’t believe us, net search for “wordpress image upload error”.  You’ll see.  Google says right now: About 1,310,000 results (0.59 seconds)

This is not a new thing, it has been going on for years since WordPress versions in the middle 3.xx-es.  It’s not a WordPress “bug” – it’s because PHP v5.3.xx went End Of Life almost 2 years ago (on 14 Aug 2014 – see: http://php.net/eol.php ).  And, see: https://wordpress.org/support/topic/wp-35-is-not-compatible-with-php-53-please-read

Now, here’s the deal.  Computers are [supposedly] cheap these days.  Supposedly.  So, [supposedly] you just buy some awesome new quad-this-or-that x64 with at least 128GB RAM and some number of TBs of storage to… host your 20-30 MB WordPress sites.  Because images, that’s why.  Oh yeah, then manually migrate 100 or so websites, databases, all the associated “stuff” and spend “a few minutes each” changing all of the myriad of things you had to do to those sites and config files to make it work a couple-few years ago.

Or: keep what you’ve got and deal with it until the new V-Lab-Super-Box is online and your “team” starts pushing things around in their spare time.  Right.

If you did google-bar the above image issue you’ll have discovered that it has gotten progressively worse the more versions away from good olde EOL PHP 5.3.xx WordPress has gotten.  We experienced this.  This page is being written in WordPress 4.2.8, the site that went to pot today auto-magic-ly updated itself to 4.5.2.  That site was having dreaded the “http Error” problem with images for over a year.  Now, today, kaput!  No images, no PDFs, no nothing through the [Add Media] [Upload] section.  We finally got a PDF to upload and link in a page by angrily clicking refresh and doing the same thing over and over (Add media, library, upload… select… repeat).  Once upon a time we could size images to “web friendly” sizes and do the Angry-Repeat click-ery – no more.  Kaput!

“Well,” says google-bar, “didn’t you know about the Media From FTP plugin?”  https://wordpress.org/plugins/media-from-ftp/  “No,” says us.  So, we give it a try and when you click [Activate] it happily tells you:  Only works with PHP version 5.4 or higher.

Then it happened, just before give-up-time, because: (1) had already uploaded via ftp the problem image; (2) had looked at the [Insert From URL] button hundreds of times today.  [Insert From Url] clicked, http://domainname.com/wp-content/uploads/2016/05/PictureName.jpg…  BAM! Done.

Now it doesn’t show up in the Library but it shows up in the page – and in Edit mode there’s the alignment stuff, room for a title and a caption, and the ability to make it a link to itself (full sized).  The only hang-up: it inserts the image with width and height set to it’s “real” values (giant in this case).  Last trick, get some server-side resizing done (on the fly stuff) and…  BAM! Done.

So, at long last, here is the long way around work-around for Great New WordPress on Great Olde Server[s] with incompatible PHP (and other things) versions.

  • ftp upload your image (keep the WordPress method of folder naming in case you ever “migrate” the site to Great New Server[s])
  • In the page or post: [Add Media] and [Insert From URL]
  • In the page or post: [Edit] the image, make it a link to itself, add a caption, title and alignment if you wish.
  • [Preview changes] and use whatever you use to see the on-screen height-width numbers you need to stop the server from sending the full-sized image to that thumbnail-sized box.  (We did Print-Screen, Paint, Select on a Windows computer.)
  • Switch your WordPress Editor to [Text] (underlying HTML) and change the width and height properties of your IMG tag.  (We changed – width=”2592″ height=”1944″ – to – width=”662″ height=”496″.)

Finally, [Save] the page or post, and go shake that piggy-bank and see about that new high-speed quad or oct thing with all the latest of everything (including PHP).  Test runs on many devices and browsers: invisible server-side image resize and send (thanks, Apache) and post complete.  Not very “reflexive” but “good enough” for now.

Now that that is taken care of… a test… of WordPress 4.2.8


This file would not upload.

Above: try again, pig headed try again, try again… error, error, long slow progress bar – worked !  Not worth the trouble.

Last notes and link:  Thanks to WordPress ( http://www.wordpress.org ) for not updating us to death.  The new Quad is actually in place and in QA Testing mode – but, migration is not going to happen until a lot more testing is done.  Known bugs are better than unknown ones.