My hosting company recently upgraded my versions of MySQL and PHP so I could upgrade to the new version of WordPress and they did eventually agree to do it for free. Since the upgrade, however, I have experienced a few problems with WordPress plugins that no longer work. One of those plugins was my cache which was installed for performance reasons. The other one was my login security plugin.
Now this was a bit of a headache because if you can’t login, then you have much less of a chance of being able to fix things. Anyway, I have finally sorted out these two problems so I thought I would post about my experience and my solutions for anyone experiencing the same difficulties.
Warning: Before we start, please understand that if you follow my advice, you are doing so entirely at your own risk.
That said, let me explain a little about the main problem with the security plugin. The one I was using is WP Login Security by Joshua Scott. I have always liked this plugin because it provides an excellent way of securing your blog. However, when a plugin designed to prevent people from logging in goes wrong, there’s always the chance that you won’t be able to login to your own account, which is exactly what happened to me.
The error I was getting was, as follows:
Warning: mt_rand() expects exactly 2 parameters, 1 given in
[path]/wp-login-security.php on line 134
Followed by a whole page of this …
Warning: Cannot modify header information – headers already sent by
(output started at [path]/pluggable.php on line 754
N.B. I have shortened the path in the above messages for clarity.
The way this particular security plugin works is that it compares the ip address you are using with the one you used successfully last time. If they don’t match, it sends an email to the admin user asking whether to add the new address to the white list or not. It is a simple idea and it worked well.
Faced with this error, I realised that the ip address that had been dished out by my ISP obviously didn’t match the ones in my white list. So at first, I resigned myself to constantly rebooting, noting the ip address and trying again; the logic being that eventually my ISP would give me an address on my white list. By the way, if you need to check your own ip address, there are plenty of sites that you can use.
After about six attempts at this, and getting nowhere, I started to think about the problem differently. I reasoned that if I were to login to my hosting account and navigate to the plugin directory, the white list might just be in a config file that I might possibly be able to find. If that were the case, I could just add my new ip address and it should then let me in.
Anyway, it is a security plugin, so I knew it was a long shot. Long story short: it didn’t work because I couldn’t find the config file. It must be hidden and possibly encrypted too. Then I had a brainwave: what would happen if I simply deleted the plugin directory, I thought? Well, that was a bit of a drastic idea, so to be a bit safer, I tried renaming it instead and – voila – that enabled me to login.
Now having got myself to the dashboard, I really wanted to restore the plugin functionality, so I deleted the plugin through the dashboard and then reinstalled it. Guess what? I got the exact same problem back again. Well, at least I knew how to fix it this time
. I then tried uninstalling and re-installing again but on both occasions, it did not work. I hope that a later version will become available sometime in the future.
The other problem I had with the cache plugin was easily sorted out once I had access to the dashboard. I simply uninstalled it. So there you have it. I hope this post helps someone out there who may be looking for help and is in need of a bit of inspiration right now.


I have to completely change hosts after 13 years because my hosting company refused to update php or mysql. Ticked me off a whole bunch (not my idea of how a loyal customer should be treated) but then again, it caused me to get a host where I have unlimited bandwidth.
Glad you worked everything out.
Hi Judith
I must say it did tick me off a bit. I needed to take out another 3 years hosting with them before they did the upgrade, but that was not an issue for me. I did not want to change hosting, but certainly would have considered doing so is they had not seen sense.
Glad you found a good hosting company.
Will
I feel your pain. I recently migrated from Blogger to my own host & domain, using WP as my blog software. After selecting the theme, changing it few times until I found one I sort of liked, and then installing essential plug-ins, I now have a nice list of coding errors to clean up. Ugh.
I found a good online code checker that displays the error & fix, so I’ll set aside part of a day and use search & replace to prune and fix the misbehaving lines of code -after I back it first.