So I was banging my head against the wall with this error and have upgraded my site manually the last couple times but this time I decided to dig a little into the error and see if I could finally resolve this.
I found the normal articles about increasing the PHP memory in various places but like most of us I don’t host my website, 1and1 hosting is my preferred host so there isn’t much I could do about the php.ini file now is there? Well actually with 1and1 they give you control over your .htaccess file and you can create additional php.ini files in any directory and 1and1 will prefer your changes in your file.
I first followed an article which suggested creating a php.ini file and adding to both the root directory and the wp-admin directory with this following
memory_limit = 42M
This didn’t make any difference and I didn’t think it would considering the default memory allocation according to my phpinfo file as already 40MB.
~sidenote: If you want to know your current PHP.ini file configuration settings you can simply create a new file called PHPinfo.php and add the following lines
<?php phpinfo (); ?>
Upload the file via FTP to your website root directory. Now navigate to www.yoursite.com/phpinfo.php and you should see a nice PHP Info webpage.
I did notice however that the following items were also changed when I used my new php.ini file.
browscap=/usr/lib/browscap.ini max_execution_time=50000 upload_max_filesize=20M
browscap=no value max_execution_time=30 upload_max_filesize=2M
So if you plan to change the PHP memory limit I recommend taking note of anything else that changes so you can set it back.
My next item of recommendation was to change the wp-config.php file located in the WordPress root directory by adding the following line.
define('WP_MEMORY_LIMIT', '42M' );
I added the line and tried again with no dice. Next up on the list was adding a line to the .htaccess file which caused my site to not load at all. I also tried a plugin automatic upgrader and several other options all with no luck.
The final solution was to deactivate all of my plugins and then apply the automatic upgrade, I first deleted all of my inactive plugins so I wouldn’t get confused as to which were activated, then I grabbed them all and applied a bulk deactivate action on them. This allowed the update to work without any issues, however I never did remove the php.ini file so I figured I would leave that part in the article in case it did help out the situation. Since the update is applied I cant go back and try again, not until next time anyway.
Thats all, good luck and I hope this works for you.
If you found this article helpful please donate, I appreciate anything including pennies.
- WordPress – Sticky a Post on the Homepage I will explain how to keep a post on the top of your homepage for those of you who want to keep a welcome to my blog style post first on your home page. It’s extremely easy and your going to kick yourself after I tell you how to do...
- WordPress wp_get_archives from specific category ? While trying to figure out how I could show posts from two categories but always keep one category on top I finally gave up. The best I could find was to run multiple custom queries using rewind_posts() but even this was difficult to carry from theme to theme as I...
- WordPress show Post Excerpts + Thumbnails This article will show you a couple methods for showing excerpts from posts on the homepage, for searches and for archives. First I will show you the manual method of editing the WordPress theme code to accomplish this but I urge you to read on as their is a much...
- WordPress create a custom Sidebar Posts Query I have been trying to learn how to make my own custom WordPress sidebar widgets because every theme uses their own custom layout and I prefer a specific layout which I can only acomplish by manually editing the WordPress theme sidebar PHP file. In this post I will show you...
- WordPress prompts for FTP credentials when trying to update plugins and themes There is a simple fix for this annoying prompt and I will cut to the short of it. FTP to your WordPress installation directory and copy the wp-config.php to your local machine. Open the file in your favorite editor and paste the following code right into the file near the top...