Ever since the bruteforce attack on WordPress there is a large number of tickets submitted from 000webhost.com users that report memory issues when trying to log in to their WordPress dashboard. The exact error message is
The value for “tried to allocate” and the actual file might change, but the value for memory size stays the same. Basically this error means WordPress is requesting more memory than the PHP setting for memory_limit allows. 000webhost.com has set the memory_limit for free accounts to 64M which should be sufficient for basic to medium WordPress installs. However, if you install a ton of plugins then the 64M limit might just not be enough.
I checked a couple of the WordPress installs that were reported as not working and found them to not make use of tons of plugins, so technically they should work fine and stay well below the 64M memory limit. But even WordPress installs that run no plugins show that error message, so there must be something wrong with either the PHP memory_limit or the server setup at 000webhost.com Checking phpinfo() on their servers the memory_limit displays 64M, so i guess it is down to whatever “security measures” they put in place to fight the bruteforce attack on WordPress installs that is going on for a while now.
They had the security measures disabled for a while but turned them back on like 3 days ago and ever since there was an increase in tickets reporting memory issues just like there was when they activated the security measures like a month ago or so. Not really sure what exactly is causing the error message but it has been reported to the helpdesk and i think things should be back to normal as soon as the security measures are turned off again.
A possible way how this could be fixed is by modifying .htaccess file and adding this line to it:
php_value memory_limit 128M
Put that line at the very top of your .htaccess file, if you get the “allowed memory size of…” error when visiting your WordPress admin dashboard then please also add a .htaccess file to the /wp-admin directory with the new value for the memory limit
I can’t confirm that it works but will have a test as soon as i see another WordPress ticket in the 000webhost.com helpdesk queue and post if it works or not. Another way would be to disable the plugins altogether using phpMyAdmin in your 000webhost.com control panel or by renaming the folders of the plugins inside the /wp-content/plugins folder.
Disabling plugins by renaming folders
- Login to your site’s files using the file manager provided by 000webhost.com or using an FTP program such as Filezilla.
- Browse to the /wp-content/plugins/ folder.
- Find the folder(s) of the plugin(s) you wish to disable.
- Rename that folder(s) to something else like <name of plugin>-disabled
Disabling plugins by editing the database
This option is more complicated. First, you’ll need to access the database for your WordPress site. phpMyAdmin is a popular tool for this that’s provided by many hosts and it’s the one we’ll use in this tutorial.
- Once you’ve logged into the database, look for the wp_options table
- Open that table and look for a row called active_plugins
- If you want to turn off all the plugins on your site, you can simply delete this entire row by clicking on the red X button beside it. That won’t cause any lasting harm except for turning off the plugins.