Cloned Moodle using wrong config/cache/database

If you use a hosting service such as cloudways, and you use their cloning functionality to make a copy of your moodle installation (say for setting up a development environment). Your cloned site will not function independently and changes you make on your clone (or your original Moodle) will automatically appear on the other Moodle. 

This is because when you cloned the database, you cloned this config setting in the database:
mysql> select * from mdl_config where name="siteidentifier";
| id | name           | value                                                                     |
|  8 | siteidentifier | |
1 row in set (0.00 sec)
If you have more than one moodle installed on the same server with the same "siteidentifier" in the database, then Moodle assumes they are supposed to be working together (e.g. load balancing) and will use shared cache for them.

To fix this you need to make your cloned site have it's own "siteidentifier", this is fairly easy, just delete the 'siteidentiifier" from the cloned database, then logon/logoff of the cloned site (Moodle will notice there is no siteidentifier and automatically create a new one).
delete from mdl_config where name="siteidentifier";

now the two Moodles are using separate cache and have different "siteidentifiers".

Make a Comment

Website and Software Development Services
Tweed Heads & Southern Gold Coast

Our network of experienced computer programmers can develop custom software solutions in any language on any platform.

Our Talents

Freelance Power

We maintain a network of local freelance computer programmers that we place in teams to match project requirements. This gives us expertise in a broad range of industries, languages & platforms

Fix, Upgrade or New?

We can fix broken legacy systems, plan and oversee a difficult upgrade, add or unlock new features to your existing software. Or install and set-up new systems from scratch, including hardware and software


We can build solutions fast, Software as a Service (Saas), apps, web applications, desktop software, Minimum Viable Product using Agile Development practices


We can build simple to complex websites, we can deliver the whole package including site design, branding, logos, domains and hosting


C/C++, Java, JavaScript,
Python, Swift, Meteor,
Objective C


MongoDB, NoSQL


Linux, Mac, Windows, iPhone, Android, Smart Phones, Tablets


Wordpress, Drupal, Magento, Moodle, Sharepoint Online, Office 365