Gatsby WP Themes Documentation

Setting up WordPress

Setting up WordPress

Your content comes from your WordPress website. That means you will need a running WordPress installation. Your WordPress website requires some initial configuration to expose the data in the right format for Gatsby.

Automated way

The easiest way to set up your WordPress site is by installing a pre-configured, ready-to-use website from the .wpress file available in the starter of your choice.

If you already have some WordPress content that you don't want to lose, the automated way is not a good option. The new installation will override your database. Please refer to the Manual way section.

Each Gatsby starter comes with a .wpress (WordPress) starter. The pre-configured WordPress installation contains all the required and recommended plugins as well as the recommended WordPress theme. More precisely, our WordPress starters use our generic Headless WP parent theme together with its starter-specific child theme.

You will also install some content (posts and pages) to start even more quickly.
To have a quick all-in-one installation experience, you will use a free, third party WordPress plugin All In One WP Migration.

  1. Make sure to have WordPress installed on your hosting.
  2. Install and activate All-in-One WP Migration plugin. It is available in the official WordPress repo.
  3. Click Import in the All-in-One WP Migration menu.
  4. The starter size may exceed the Maximum upload file size available (this may vary depending on your hosting).
    All-in-One WP Migration gives you a few solutions here. An easy way to upgrade the import size to 512MB is by downloading and installing this add-on plugin.
  5. Chose Import from File and the .wpress package file corresponding to your Gatsby starter. {" "} A screenshot from the import process with All in One WP Migration
  6. Our starter is now installed!
  7. Log in to your website. You will have to use the following temporary credentials:
    • username: admin
    • password: gatsbyWPThemes
  8. Go to Settings > Permalinks and save your permalinks structure (click the Save Changes button).
  9. Create a new user with secure credentials, log in with your new credentials and delete the temporary admin account.
  10. That's it! Your WordPress website is ready for Gatsby.

Manual way

If you already have a WordPress website with some content you want to preserve, you will need to set it up manually.

  1. Install the recommended WordPress themes:
    • the generic, parent theme Headless WP
    • the starter-specific child theme (for example Headless WP Base Child)
  2. Activate the child theme
  3. The theme will automatically check if the required and recommended plugins are activated
  4. The theme provides a one-click plugins-installation. You can also install required and recommended plugins, as listed below, manually.

Required plugins

  • WPGatsby installed from the WordPress repository
  • WPGraphQL - installed from the WordPress repository

Your WordPress installation must have pretty permalinks enabled. (Most hosting services provide support for pretty permalinks so this is rarely an issue.) Also, the permalink structure must not be the default plain one, You can modify the permalinks structure via your WordPress dashboard area in Settings > Permalinks.