If you see the following errors in your PrestaShop admin panel or during an update:
Error found : StartTag: invalid element name in country_module_list.xml file.Error found : Extra content at the end of the document in country_module_list.xml file.Error found : StartTag: invalid element name in must_have_module_list.xml file.Error found : Extra content at the end of the document in must_have_module_list.xml file.
the issue is usually caused by corrupted XML files located in the /config/xml/ directory. In most cases, the fix is simple — just delete the affected XML files.
WHAT DOES THIS ERROR MEAN?
PrestaShop is unable to read the XML file because it is invalid (corrupted, incomplete, or incorrectly structured). This typically happens after an interrupted update, server migration, PHP version change, or due to server security filters.
WHERE IS THE PROBLEM LOCATED?
Check the following files:
/config/xml/country_module_list.xml
/config/xml/must_have_module_list.xml
These XML files only contain a list of recommended modules (for example, by country) and are not critical for your store’s operation.
FASTEST FIX – DELETE THE XML FILES
Option 1: Via FTP / SFTP
- Connect to your server using FTP/SFTP.
- Open the
/config/xml/directory. - Delete
country_module_list.xmlandmust_have_module_list.xml. - Clear the cache in PrestaShop (Advanced Parameters → Performance → Clear cache).
Option 2: Via SSH
Run the following commands:
cd /path/to/prestashop/config/xml
rm -f country_module_list.xml
rm -f must_have_module_list.xml
WHY IS IT SAFE TO DELETE THESE FILES?
- It does not affect the database.
- Products and orders remain untouched.
- Your store functionality is not impacted.
- PrestaShop will regenerate or re-download the files if needed.
IF THE ERROR RETURNS
- Check permissions of the
/config/xml/directory (typically 755) and proper webserver ownership. - Verify PHP compatibility with PrestaShop 1.7.
- Review mod_security, WAF, or firewall rules that may corrupt downloaded content.
- During migration, always use proper transfer methods (SFTP/rsync) and verify file integrity.
SUMMARY
The StartTag: invalid element name and Extra content at the end of the document errors in country_module_list.xml and must_have_module_list.xml are usually resolved by simply deleting these XML files from the /config/xml/ directory and clearing the cache.



