Hello!
I’ve just begun working on my first ever headless site, backend will be handled by WP and frontend will be done with GatsbyJS.
Setting up as I usually do with Bedrock, I installed WP on a subdomain (admin.mydomain.com) with the idea that the frontend will live on mydomain.com.
After the installation finished, permalinks etcetera in the backend pointed towards admin.mydomain.com, and I wanted to have the permalinks point to the frontend instead, so I dug into my .env file and made some changes:
WP_HOME='http://admin.mydomain.test'
WP_SITEURL='http://admin.mydomain.test/wp'
became
WP_HOME='http://mydomain.test'
WP_SITEURL='http://admin.mydomain.test/wp'
and that successfully fixed my permalinks. However, now I get some console errors in the backend, some plugins are looking for resources that they can’t find with this config. For example, ACF complains:
GET http://mydomain.test/app/plugins/advanced-custom-fields-pro/assets/css/acf-global.css?ver=5.8.4 net::ERR_NAME_NOT_RESOLVED
I’m wondering what the proper course of action is here. It seems that WP_PLUGIN_URL
might should be changed somehow, but I’m not sure if that’s the best way to do it. Curious what other people have done in this situation.