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.










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.
Hi, I try to update my Magento 1.4.0.1 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!
Hi Tiago, I’ve been on holiday for a couple of days. Did you find a solution?
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 1.3.2.2 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 :(
Here is what I would do:
1) Download the Magento zip file for the version you want to upgrade to,
2) Unzip the file,
3) Use an FTP program like FileZilla to access your server’s directory structure,
4) Upload the unzipped Magento files to your server so that the new files replace the old files
5) Make sure you backup your Magento configuration file – the one that contains your database login details. This file should not be overwritten but if it is you should restore it with your backup.
I deleted the maintenanceflag.php file however now I have a 500 Internal Server error. Any idea what may be causing this?
Give the other two bits a try too:
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.
Thank you, you saved my magento!
Welcome!