I cloned Magento project from main domain to subdomain in cPanel. I fixed secure and unsecure URL in database. But if I input subdomain URL, it show main domain URL. How can I fix it?

1 Answer 1


You will need to open up the core_config_data table. In the example below, the table is named mgql_core_config_table. You will need to change the URL to the new URL in the following two records:



Change the value section from http://main.com/ to http://subdomain.com/ in there.

Finally Clearing the cache: bin/magento cache:clean

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.