How to Protect Upgrade.php in Elgg 1.8

Elgg has a nice feature called upgrade.php that allows you to flush the elgg cache and update your network layout. However if this tool is being run by several users at the same time, it could waste our server resources. For that reason in this article I will give a step by step guide on how to protect upgrade.php in elgg 1.8

1. In order to protect upgrade.php we will use a tool called Upgrade Key which can be downloaded here

2. After downloading the plugin, upload the plugin to the mod folder of your Elgg network to install it. If you don’t know how to do that, please read this article.

3. After that, go to Elgg Administration Dashboard. There go to Menu “Configure -> Plugins” and look for Upgrade Key plugin and activate it:

4. The upgrade key is now active, but still needs to be configure. First you need to set a 10 characters alphanumeric key, it can be anything you want (Numbers & Letters only). It should look like this:


5.  Go to the root folder of your elgg network and open the ‘engine’ folder. Then open the file settings.php

6. Add this line below the global $Config

$CONFIG->upgrade_key = ‘iyrA4p22sw’;

Note: Replace the key with your own key. This is an example key only

Setting upgrade key

7. Save the changes and that’s it! Upgrade.php is now protected.

This tool will only let the Administrator of the elgg network to run upgrade.php This will ensure that no one abuses our server resources:

Error Displayed if a non admin runs upgrade.php

This concludes How to protect upgrade.php in elgg 1.8

Looking for quality Elgg Web Hosting? Look no further than Arvixe Web Hosting!

Happy Hosting!

Rodolfo Hernandez

Tags: , , , , , , , , , , , | Posted under cPanel/Linux Hosting, Elgg | RSS 2.0

Author Spotlight

Rodolfo Hernandez

I like photography and reading books. Currently working for Arvixe as Elgg Community Liaison. Elgg Security Expert Web Security Expert CEO of UDP SW Social Web

Leave a Reply

Your email address will not be published. Required fields are marked *