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.
- Make sure to have WordPress installed on your hosting.
- Install and activate All-in-One WP Migration plugin. It is available in the official WordPress repo.
- Click Import in the All-in-One WP Migration menu.
- 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 to512MB
is by downloading and installing this add-on plugin. - Chose Import from File and the
.wpress
package file corresponding to your Gatsby starter. {" "} - Our starter is now installed!
- Log in to your website. You will have to use the following temporary credentials:
- username:
admin
- password:
gatsbyWPThemes
- username:
- Go to Settings > Permalinks and save your permalinks structure (click the Save Changes button).
- Create a new user with secure credentials, log in with your new credentials and delete the temporary admin account.
- 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.
- Install the recommended WordPress themes:
- the generic, parent theme Headless WP
- the starter-specific child theme (for example Headless WP Base Child)
- Activate the child theme
- The theme will automatically check if the required and recommended plugins are activated
- The theme provides a one-click plugins-installation. You can also install required and recommended plugins, as listed below, manually.
Required plugins
Recommended plugins
- Contact Form 7 - available in the WordPress repo
- Yoast SEO - available in the WordPress repo
- Add WPGraphQL SEO - available in the WordPress repo
- Code Syntax Block - available in the WordPress repo
Permalinks structure
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, http://example.com/?p=123
. You can modify the permalinks structure via your WordPress dashboard area in Settings > Permalinks.