This covers everything that needs to be set in WordPress to complete the setup processes, as well as to organise and help to understand the projects ecosystem and mechanics.
Start with uploading and activating the Headless Previews theme, then Headless Mods plugin as main dependencies.
This is a blank starter preview theme for headless websites, it lets You modify the WordPress backend using custom functions and php as well as supports Tailwind CSS in the editor on drafts of posts.

Go to themes -> upload new -> upload the .zip file downloaded from here, the do the same for the plugin under plugins, activate the headless theme and plugin instantly.

Then go to Plugins -> Headless Dependencies screen from the left admin menu, where You will find the required plugins for everything to work smoothly, with download links and install status.

First download all the required plugins, second install them using Plugins -> Add Plugin -> upload .zip, third activate them in this order, you can get all the required plugins at this page, you can refer to each plugin’s official documentation for more details.
*Optional – can be set later, otherwise required.
After You install and activate the minimum requirements as shown below on the screen You are ready to start developing, the dependencies manager will help You not mess anything up while updating, you can now safely auto-update the plugins that have this option.

Note: After activating the plugins run the Woo and Polylang setups, remember to assign the content to a language if no language is set and set a language for the content.
The static homepage will hold customisation options for each language of the theme, make sure You have a page published, then go to Settings -> reading settings -> Use static homepage
You can omit the posts page and leave it empty (f.e. /blog/) from the reading settings as the theme will render a default /blog/ page automatically.
To work properly the theme needs a static homepage set for each language. Make sure You set them before trying anything.
Also set the backend to be discouraged by search engines, as You don’t want it to be indexed this is fine, as Your frontend gatsby part will rank better for SEO.
It’s a good practice to also set the desired permalinks structure at the start.
Note: Permalink settings – changes to all permalinks are fully supported
Note: Do not set anything in the WPGatsby settings under Settings > GatsbyJS as this is deprecated. It will be removed in the future update.

The white-label login to the backend and other security improvements are introduced at the bottom of the admin menu under Secure Login
You can change the default /wp-login.php endpoint to a custom one, for instance custom-login.php will be the new endpoint when the headless mods plugins is active. You can customize the logo and colors also.

There are also two more options that will block edits and modifications to security critical points like plugins and themes, checking the boxes will apply those modifications (turning off plugin / theme updates and modifications).
Note: It is a good practice to turn them off once in a while to handle stable updates.
It is required that those Woo pages are set to draft as the theme will handle them independently and having them published will result in a name conflict. You can also delete them but woo will complain, so a draft is an optimal solution.
The homepage needs to be set and published, any other pages will generate during builds at the set urls. If You want to modify these pages, changes to code need to be applied.

Any currency is allowed coming soon, but some payment methods will change depending on it, Currently only one – PLN currency is supported by default soon to be any.
We need to add a valid shipping zone for the theme to calculate shipping properly.
Go to Woocommerce -> Settings -> Shipping zones, then add a shipping zone for all countries You ship to. The shipping costs will be automatically calculated during checkout based on the input shipping adress.
The followed settings are suggested under Woocommerce > Settings > Advanced:
wp-config.phpIt is recommended to add those definitions variables in the file for development best practices and to prevent timeouts and errors, open Your wp-config.php file with a text editor and add the following lines changing the YOUR_SECRET_SALT_KEY to an actual salt key.
You can generate a secret salt key here.
// Best practices for headless setup
define('GRAPHQL_JWT_AUTH_SECRET_KEY','YOUR_SECRET_SALT_KEY');
set_time_limit(300000);
Go to WordPress, left admin menu: GraphQL -> Settings -> WPGraphQL General Settings
Configure useful settings for Your backend server communication.
Prepare these two values for the next steps:
GATSBY_WPGRAPHQL_URL=https://backend.your-domain.com/graphql
GATSBY_BACKEND_DOMAIN=backend.your-domain.com
Note: https://your-backend-domain.com/graphql or https://backend.your-domain.com/graphql – will be the default, can be configured also with subdomain as shown above for lower costs. (note the proper production needs https protocol, for development http can be provided.