The most recent WordPress.org upgrade (3.5.1) for self-hosted sites came with a special little present: a bouquet of bugs. I discovered this today when, to my horror, I realised that the Visual Editor – that’s the box where you type your copy & upload your images, wasn’t working.
There is a reason why sensible people prefer to wait a month or two after WordPress publish upgrades until all the bugs have been found and solutions published. Unfortunately I was not one of them. For the love of Mike DO NOT UPGRADE.
I find people who use self-hosted WP blogs come in three categories: (a) people who commission others to build their sites, who can cope with day-to-day blogging requirements, but have no idea how the true back end works, (b) people like me, who built their sites & sorted out hosting themselves with dogged persistence and determination – but aren’t always sure *exactly* why things do what they do and finally, (c) those for whom WordPress.org and code are as meat and drink.
(If you don’t blog – or don’t use WordPress.org (as opposed to off-the-shelf Blogger or WordPress.com sites), then I might as well be speaking in tongues where this post is concerned, and I recommend you use your Get Out of Jail Free card and hop off tout suite to another post.)
Anyway, I spent 2,5 hours this evening, when I should have been at the Tara Jarmon store party on Bond Street, looking for a solution so I could get blogging again. I actually found it pretty quickly in a WordPress.org forum – although it wasn’t very clear at the time that it was the solution.
What took up all that time was working out how to implement that solution. Once I had found the correct place to start it took approx 3 minutes to rectify.
So for those of you who discover that your Visual Editor text box has gone awry here’s what to do:
The fix is one line of code that you need to insert into your wp-configure.php script file.
For those of you who know what is and where to find the wp-configure.php script file, scroll immediately to the bottom of this post for the fixer code. Slightly challenged WP users (like myself) keep reading.
(Some people in the forums have also discovered that the odd rogue WordPress plugin seems to be causing a similar problem. So I recommend first upgrading all your plugins and themes – if you don’t do that already as a matter of course anyway. I really wouldn’t bother disabling each plugin one by one looking for a bad’un, unless this code fix I am about to give you doesn’t work.)
So first off: the wp-configure.php script file is not to be found on your everyday WP blog backend where you type your posts. Do not waste precious time blindly clicking on on the LH directory bar vainly wondering where this code file might be. Ahem.
Where it lurks is nowhere near your blog site. It sits on on whichever external site is hosting your blog. That’s where the true backend WordPress files full of lovely code that power your site are uploaded, installed, and stored – hence ‘hosted’.
I am now going to give instructions for self-hosted WordPress blogs on GoDaddy, whom I use to host LLG (I don’t recommend them BTW), but the principle remains the same whoever hosts your site externally.
Go to the site that hosts your blog, log in, and head to the Control Panel.
Click on Hosting
Click on Launch
Click on Files & FTP
Click on File Manager
This will bring up a directory on the left hand side. The main entry should be called html. Ignore all its sub directories called wp-admin etc. Look to the main box to the right where all the sub directories and files in html are listed, and scroll down looking for the wp-configure.php script file.
DO NOT do as I did, and spend 45 minutes hunting for it in vain, mystifed and weeping, (this is where both ‘dogged’ & ‘determination’ come in). because I did not realise that there were two pages and the wp-configure.php file I wanted was on the second page.
When you find the wp-configure.php script file, open it. (In GoDaddy, click to highlight it, then go up to the toolbar and click on the little Edit box. This will open up the file.)
The file, when it opens, will be full of code.
Do not weep.
Just scroll right down to the bottom and look for this line at the end:
/* That’s all, stop editing! Happy blogging. */
Above this line, copy and paste this line of code:
define(‘CONCATENATE_SCRIPTS’, false );
Save the file.
In GoDaddy that means: Scroll back up to the top of the box and look for the tiny Save icon on the top of the text box (it’s a little floppy disc square). Click on it, and a notification window will pop up telling you that the script has been saved. Then close the box down.
That’s it. Leave your host’s website window open, in case you have done something wrong, whilst you go back to the page with the Visual Editor on your blog’s own backend.
Clear the cache (If your browser is Chrome click on Chrome in the top Toolbar, then click on Clear Browsing Data. When the new window opens click on Empty the Cache. In Firefox, click on Tools in the Toolbar, then click on Clear Recent History. When the new box pops up click on Cache.)
Then refresh your blog, and you should magically see the Visual Editor toolbar re-appear above the text box.
If this doesn’t work, I pass. Sorry! Go try disabling your plugins as per my recommendation at the top of this post. But according to the many, many forums I have read through this evening, this line of code is a pretty impressive cure-all for many of the WP 3.5.1 upgrade bugs.
After all that, I was curious to know why this problem had happened and, by dint of a lot of reading that stretched my brain rather, have cobbled together the following explanation. (Tech people reading this, please: feel free to tell me I have got it all wrong.)
Basically WordPress seems to be trying to load all its scripts at once, and this is causing the site to malfunction. Whilst script concatenation is normal, it appears that trying to load all of them together simultaneously is not.
Hence the code fix disables concatenation by changing the command to false in the wp-config.php script file.
So, if you try this fix, do let me know if it works…
NB: Friday, 0030hrs. I’ve discovered that I can’t hyperlink, change the Permalink, upload media (but I externally host images so not affected by this) or use the Quick Edit box, so there is still something not quite right, but this is at least a very quick fix so you can get blogging again with 95% of features now working. When I find a solution to these issues, I’ll post it here.
Feb 01. 0900hrs. UPDATE:
This morning I woke up to the news that Google – and therefore Chrome have blocked my site for Malware. I just cannot believe that this is a coincidence.