Document Moved Error after Upgrade to OpenCart 3.x.x.x

If you have upgraded to OpenCart 3.x.x.x recently and are noticing a “Document Moved” Error when accessing extensions in your OpenCart Admin Panel It is due to a misconfigured line in your config.php file that resides inside your admin folder. (public_html/admin/config.php).

You will find a line that says:

define('OPENCART_SERVER', 'http://www.opencart.com/');

The line actually needs to read like this:

define('OPENCART_SERVER', 'https://www.opencart.com/');

The problem is if you’re running your OpenCart with HTTPS…Which you SHOULD be the non-https URL won’t load from within the admin panel. The purpose of that URL is to grab the extension lists and extension advertisements and show them on the extensions page. Replace that one line and the issue will be resolved!

If this helped you in any way I would be super appreciative of any donation you can give by clicking the button below:

I have referenced this error here, on the official OpenCart Github: https://github.com/opencart/opencart/issues/7269

And also made the corresponding pull request to fix the code in the upgrade script that causes this error on upgrade only:
https://github.com/opencart/opencart/pull/7268