How to Install WordPress on Hetzner

Hetzner Cloud is a solid and well-established server provider. It is the ideal server provider for European users, with affordable and powerful servers in Germany and Finland. Especially if you need to create a server in Europe due to GDPR policies. Hetzner is fully integrated with SpinupWP, meaning you can connect SpinupWP to your Hetzner account and spin up servers at Hetzner directly from your SpinupWP dashboard.

Before you begin this tutorial, you’ll need to sign up for SpinupWP and click Spin Up a New Server from the dashboard if you haven’t already.

In this doc, we’ll cover:

  1. Adding Hetzner as Your Server Provider
  2. Provisioning a Server
    1. Hetzner Server Options
    2. Server Settings
    3. Database Settings
    4. Installing MySQL
    5. Using an External Database
    6. Run the Provision
  3. Next Steps

Adding Hetzner as Your Server Provider

Let’s go ahead and connect Hetzner to SpinupWP. Before you start this process, you will need to sign up for a Hetzner account if you don’t already have one.

Log into your Hetzner account and access the appropriate project. Then click on Security, go to the API Tokens tab, and click on the Generate API token button.

Hetzner Security tab showing "Generate API Token" button

Enter the name for your token, and make sure that the “Read & Write” permission is selected, and then click Generate API token. After the token has been generated, you will need to click on Click to show and then copy your token to enter into SpinupWP.

Generate API token window in Hetzner showing Read and Write Permissions as checked

Enter the API key key that you copied from Hetzner into the API Key field and click Create on Hetzner to finish adding the server provider.

SpinupWP screen showing field where you enter your Hetzner API Token

Provisioning a Server

Hetzner Server options

Now you choose the size of the server and which Hetzner region it should reside in. We recommend production servers have at least 2 GB of memory. Servers can always be upgraded to a larger size later from the Hetzner dashboard but the server will be offline while it resizes. For more help choosing a server size, check out the Server Size doc.

You can choose to have Hetzner enable Auto Backups as an add on for an additional monthly fee. These are server backups and are not to be confused with SpinupWP’s site backups feature which backs up site files and database, rather than the entire server. If you choose to enable this feature, you’ll be billed directly by Hetzner.

SpinupWP screen showing Hetzner server options

Server Settings

Next, you need to enter a hostname for the server, so you can distinguish servers from each other. For example, if you are spinning up a new server for a client site, such as xyzvanlines.com, then using the domain name is recommended. If you are spinning up a server for your agency to use for a bunch of client staging sites, you might want to use something like staging.turnipjuice.media.

On this screen, you will also be able to configure the server timezone. The selected timezone will determine when server cron jobs run as well as the date format of some log files.

You will also have an opportunity to enter an optional post-provision script on this screen. This is a one-time script that will be run on the server once the provision process has completed. This is handy if you have any additional packages you know you will want to install on the server.

SpinupWP screen showing option to add a post-provision script

Database settings

Lastly, you can choose to install MySQL on the server or connect an external database server.

Installing MySQL

Installing MySQL on the new server is very straightforward. The only option you need to think about is the database root password.

A random secure database root password is generated for you, but you can change it to something else if you prefer. You may want to note it down or store it in a password manager for future reference, but you can always reset it in SpinupWP later.

SpinupWP screen showing field to create a Database Root Password

Using an External Database

Using an external database requires a little more configuration, but offers many benefits.

Run the Provision

Once you’re happy with the settings, click Provision Server and the server will start to be provisioned for you.

Server provisioning screen in SpinupWP

This process takes around 10 minutes, but you don’t need to stay on the screen and wait. We’ll email you when it’s complete and put a notification in the top bar in the app.

The IP address of your new server will be provided during this process. If you are using an external database, don’t forget to add it to any whitelists with the hosted database provider.

The server is provisioned with the latest stable server software (Nginx, PHP-FPM, Redis) for hosting WordPress sites. The following docs will help you understand more about how the server is set up and configured:

Next steps

To continue your setup and add a site, see our Getting Started doc.

What to expect after adding a site? You’ll have the option to configure your server and sites to your needs via the SpinupWP dashboard.

You’ll be able to quickly enable page caching. When enabled, SpinupWP configures full page caching, essentially turning your site into a static site and dramatically improving the load time of your site.

You can also toggle on an SSL certificate to enable HTTPS. This generates a free Let’s Encrypt TLS certificate so you don’t have to manually manage this yourself. If you’d prefer to use a custom SSL certificate, you’ll have the opportunity to upload that instead.

If you’re looking to add rewrite rules or prevent PHP scripts from being executed in the uploads folder, the Nginx settings steps will cover that.

We’ll also cover enabling SFTP & SSH access to your site and setting up site backups.

SpinupWP can take care of automated daily site backups which include full backups of your site files (media, themes and plugins). You’ll have the option to backup to Amazon S3, DigitalOcean Spaces, Akamai (formerly Linode), Google Cloud Storage, Wasabi or Backblaze B2.

Follow our Getting Started Guide for step by step instructions for all of the above mentioned features and more.