After adding domain name to magento 2 website, admin panel not working properly.

May 17, 2017 3.8k views
Apache PHP Ubuntu 16.04

System: ubuntu 16.04
apache 2, php 7 mysql 5.7

When I didn’t add domain to the droplet, everything works fine. But when I add the domain, the admin panel of the magento 2 website is not working properly. the submenu content is blank after loading.

I am using the CloudFlare to mange the domain, and I simply add a record with the ip address of the droplet. The website is running without any errors. I cannot find any useful information and there is not log for the problem which is showing in the picture below.

The problem is showing in the link below.
http://nas.fmfreedom.com/sample/shot1.png

4 Answers

Hi @mingfang

You need to update your base_url in the database and then clear the cache.
Have a look at these two answers:
https://magento.stackexchange.com/questions/134245/base-url-change-magento2-1
https://mage2.pro/t/topic/22

Please make sure you’ve made a backup of the database before doing such commands. I would even recommend doing a snapshot in the control panel of DigitalOcean, so you can restore the entire server in case something goes wrong.

The error is happening after I update the website with the new domain and I have already updated the URL in the database as well. And then I cleaned the cache.
I even make the exactly setup in my local vps, it is working perfect in my local server. Also I made another droplet and set up the LAMP again, the submenu still not showing. After I change the ip back, and clean the cache. The website works fine. I checked all log, and there is no errors.

  • @mingfang
    How about setting up a new droplet - add the domain - then install Magento?
    I’ve been running Magento for several years and this is how I move domains, but I must admit that I haven’t used Magento2 for anything other than testing.
    Could you enable debug logging in Magento, since you say nothing is logged in the Apache log?

The issue still there, I cannot find any error in the website.
Here is the login and password for the domain.
I setup a demo, if there anyone know what is wrong with the droplet, please tell me.
Thank you very much!!!!
http://beta.freco.nz/admin_freco/
Username: admin
Password: passw0rd

The problem still cannot be solved… Until now I still cannot figure it out. And the problem only happened on digital ocean.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!