Fix Magento Internal Server 500 Error After Bad Update

Magento Community Edition is one of the best open source shopping carts, supposedly. My clients like it, I don’t. I think it’s clumsy to manage, the admin panel is ill thought out, there’s no drag’n’drop interface and it regularly crashes with Internal Server 500 Errors when updated.

But this post is about fixing the error that happens when the cart software is updated…

Specifically, updating Mage_Downloader causes Megento to crash to ground like a skydiver without a parachute.

It just isn’t WordPress.

How can you fix this Magento server error?

When the cart software updates modules, it changes a few file permissions and creates a .maintenanceFlag file. When Mage_Downloader updates, it stops before the file permissions are reversed; and sometimes stops before the maintenance flag file is removed.

To get your site working again, use your file manager or FTP program to browse the cart’s files and make the following changes:

  • In the cart’s root directory
    • Delete the .maintenanceFlag file.
    • Change the file permissions for index.php from 666 to 755.
  • In the cart’s download directory, change the permissions for index.php from 666 to 755.

Reload the admin page or store’s front page in your web browser. It should load now. If it doesn’t, leave me a comment and I’ll help you fix it.

Why does Magento make those changes?

Simple. To stop visitors from accessing the site while it’s being updated. The .maintenanceFlag file causes the site to display a maintenance mode page to visitors. Changing the permissions of index.php from 755 to 666 stops the index.php files from being executed (run) by web clients.

Sharing is caring!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

newest oldest most voted
Notify of

Maybe there is something left there with a tool bar or even another software that forbids any transaction to any other server. This will possibly cause internal server errors and that thing really disappoints me. 

Tiago Vergutz

Hi, I try to update my Magento to any other version, before run the command in ssh ./pear mage-core/Mage_All_Latest occurred many erros but the Module Mag_Downloader 1.5 was installed, and with it my admin page return 500 internal server error, but only the admin, the frontend of my store is alright. I change the file permission of my index.php and the index from downloader dir, but .maintaintenanceFlag no exists. Help me please!

Tiago Vergutz

Hello Lee, the last 2 weeks I’ve been trying and nothing solved my problem. I’ve created many posts in many different foruns and nobody can help me. I need to upgrade the Magento from version to 1.4.2 or newer (preferably newer). I tried many tutorials but all resulted in one or other type of error that I can’t solve. I don’t know what to do, I’m in point of pay for any freelancer or a company that provide Magento upgrade services :(


I deleted the maintenanceflag.php file however now I have a 500 Internal Server error. Any idea what may be causing this?


Thank you, you saved my magento!

i changed the permissions n deleted the flag, still getting the internal server error.


Hi Lee,

I’d really appreciate your assistance. Tried to create a backup through System > Tools > Backup and got an error in the process.

Now when I try to login to the admin panel I get error 503. The front-end is working fine though, I have tried pretty much every fix out there – no such luck.

And to top it all off, there is no maintenance.flag file anywhere on my server.


I managed to resolve this issue by going to and changing the “Put store on the maintenance mode while installing/upgrading”


Cant find maintenance flag file please help me,i was taking backup and that error occur,


thanks a lot JournalXtra i deleted that file and it worked :D

Hi !
I am using magento I have problem with contact us form .
when someone try to submit the form it gives the internal server error.
please help me.


Thanks, This is work for me.

Luis A.

Lee muchísimas gracias, me acabas de salvar la vida con esa super ayuda.



after upgrading magento from 1.8.1 to am getting following error after following your steps(mentioned above)

Whoops, it looks like you have an invalid PHP version.
Magento supports PHP 5.3.0 or newer. Find out how to install Magento using PHP-CGI as a work-around. both on fronend and backend.

Kindly help me



Thanks a lot for this solution.It worked for me.I have been trying to solve this error from the last 3 to 4 days.Thaks a lot……..

Hi Lee, After trying to update Magento from to, my magento website is broken. Are you able to assist. All content pages work but category and product pages have errors. The have the following error message: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘FLOOR((ROUND((e.min_price) * 1, 2)) / 10) + 1’ in ‘order clause’, query was: SELECT FLOOR((ROUND((e.min_price) * 1, 2)) / 10) + 1 AS `range`, COUNT(*) AS `count` FROM `i0vy_catalog_product_index_price` AS `e` INNER JOIN `i0vy_catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id = ’12’ WHERE ( e.website_id = ‘1’ ) AND… Read more »

Hi… the problem related by “Vish” was in the 1.9.1 Magento Class: Mage_Catalog_Model_Resource_Layer_Filter_Price, around line 272

//Commnet original line
//$select->group($rangeExpr)->order(“$rangeExpr ASC”);
//put this until there is a bug fix
$select->group($rangeExpr)->order(“range ASC”);

Thereby you going to generate an correct ORDER BY ‘range’ ASC and no more (ORDER BY `FLOOR((ROUND((e`.`min_price) * 1, 2)) / 100) + 1` ASC)

Thank you I had same problem and fixed it by commenting and adding the line you specified.

Thank you very much for ur information


theme is wrking well in localhost after uploading in my server when i select any page in frontend i’m getting like,
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator and inform them of the time the error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
Apache Server at Port 80

plz help!!

I am getting 500 error after upgrade the version from to
I have applied your solution but not working.
deleted the maintenceflag
change the root index file permission to 755
there is no file in downloads folder


Thank you! It really works for me. Magento makes me crazy, it’s a very complicated and stupid system.


Thanks a lot! You save my day ;)


Just found this post – saved me whole load of hassle – thank you

Hey I have a weird error on my Magento, suddenly when clicking check for updates in Magento connect, it just hide all extensions, and console shows:

500 (Internal Server Error)checkForUpdateClick @ index.php?A=connectPackages:540onclick @ index.php?A=connectPackages:162
Navigated to https://www.******.com/downloader/index.php?A=connectPackages&maintenance=1&updates=yes


I can’t find my maintenance file


Everything worked until I went to my admin section and now its just a blank page any clues? 0_o


Below mentioned url is live but I am trying to update to the same copy in Localhost.
I am updating from to latest version available (1.9.2.*), After upgrading admin dashboard is showing white screen and frontend loading but not skin folder , here it is searching for other theme files. What I observed here after upgrade: theme is changing means looking for base but Iam using rwd.

How to solve this issue?

Fatal error: Call to a member function setActive() on boolean in /home1/Juliet/public_html/ on line 104

Line 104 states: $this->getLayout()->getBlock(‘menu’)->setActive($menuPath);

I get the above error when I try to log into the Magento Admin. Otherwise, the Server 500 error is gone.

After updating Easy PDF module at the Magento Connect to latest version… my site displays that code. I deleted all the cache in VAR/CACHE folder. Also changed permission to index.php file. Refreshed my browser many times, but no luck. Still the site does not appear.