Headless WordPress on Subdomain

Hello,

I am trying to wrap my head around a headless wordpress setup with the frontend hosted on Netlify. I have my custom domain set to use Netlify’s DNS. Do I only have to point an A record to the IP address of the server where the WordPress install is hosted? Am I supposed to point a CNAME record as well?

Hey @ck9891, I think you’ll want to look into this post/video that talks about what’s involved in setting up headless Wordpress with Netlify:


You’ll need to pull your Wordpress data into a static site generator and deploy that static site on Netlify.

If you’ve done that already, we’d be happy to help you set up your DNS records on the Netlify side- let us know!

Hi Jen, I’ve already deployed a Gatsby frontend with Netlify at the root domain. The root domain was registered through GoDaddy, but I’ve set it to Netlify’s name servers.

I’m looking to be able to point the sub-domain, or sub-domains, to the actual WordPress install so I can access the admin panel and have sub-sites living on the sub-domain.

You should be able to do this on the Netlify DNS settings page for this site. Keep in mind that you will also have to change the name of the site in WordPress to reflect the fact that it is running as a non-www subdomain, or else your WordPress instance will lock up tight as a drum. If that happens, you will have to go in with phpMyAdmin (or the equivalent) and update the subdomain name in the MySQL database.

Alternatively, assuming you have WordPress running on a host somewhere where it has an internal “non-custom” domain (such as yoursite.wpengine.com), just use that assigned domain name, as there should be no one but you visiting it.