WordPress for MySQL

Easily setup and configure MySQL hosting for your WordPress website or application with automated backups, high availability, and unlimited databases.

Check out our How to Setup a WordPress MySQL Database in the Cloud blog post to learn more about the advantages of using ScaleGrid.

Create a MySQL Deployment at ScaleGrid

  1. Sign up for a free 30-day trial on the ScaleGrid console.
  2. Create a new MySQL deployment in a few easy steps from our Getting Started page. Make sure to create it in a region that matches your WordPress deployment region. We support six different MySQL DBaaS plans on AWS, Azure, GCP, OCI, Linode and DigitalOcean.


Setup Instructions

Dedicated MySQL Deployment – Host through your ScaleGrid account.
BYOC MySQL Deployment – Host through your own cloud account.

  1. In the create wizard that pops up, customize your plan details, replica setup, security, and firewall rules to create your new MySQL deployment at ScaleGrid. Follow the links above in the yellow box for detailed instructions on creating your cluster under each plan.

Setup Your MySQL Database & Admin User for WordPress

While setting up your WordPress site, you will be asked to supply the hostname, database name and user credentials for your MySQL database. Here’s how you can set this up:

Create a New MySQL Database

  1. Go to your MySQL cluster list page, and select your newly created cluster.
  2. Select the ‘Databases’ tab, and click the green ‘New Database’ button.
  3. In the ‘Create a new database’ window that pops up, simply enter a name for your database, for example, ‘wordpress_database’, and click ‘Create’.

Check out our Create a MySQL Database doc for more instructions.

Create a New MySQL Database User

  1. Select the ‘Users‘ tab on your MySQL cluster details page, and click the ‘New User’ button.
  2. Select the new ‘wordpress_database’ that you just created from the dropdown field as the database for this user.
  3. In the ‘New User’ window that comes up, enter a name and password for the new user, for example, ‘wpuser’.
  4. Lastly, select ‘Read-Write’ as the ‘Role’ for this new user:
  5. Click ‘Create’ and your new user will be created! Make note of your database name, username, and password which you’ll need for your WordPress installation.

Check out our Create a MySQL Database User doc for more instructions.

Find Your MySQL Hostname

  1. Go to your MySQL Cluster Details page and select the ‘Overview’ tab.
  2. Find the Command Line Syntax section at the bottom of the page to see the command that can be used to connect your MySQL deployment through MySQL client.
  3. The server name following the ‘-h’ option is the hostname of your MySQL deployment, and in this particular case, it is ‘SG-help-1-master.devservers.scalegrid.io’.

Test Connectivity Between Your WordPress Site & MySQL Server


Before you begin configuring your WordPress installation, we recommend checking the connectivity between your WordPress server and MySQL deployment.

In order to check your MySQL WordPress connectivity, you will need a MySQL client on your server. Follow these instructions to download and install MySQL client if not already installed. Execute the following from the command line of your WordPress server and make sure you are able to connect:

mysql -u wpuser -h SG-help-1-master.devservers.scalegrid.io -p<Your Password>

If you’ve enabled SSL for your MySQL server, make sure that you see the ‘Cipher in use’ output for the SSL field as shown below:

mysql> status;


mysql  Ver 14.14 Distrib 5.7.15, for Win64 (x86_64)

Connection id:          79854

Current database:

Current user:           wpuser@xxxx

SSL:                    Cipher in use is DHE-RSA-AES256-SHA

Using delimiter:        ;

Server version:         5.7.21-log MySQL Community Server (GPL)

Protocol version:       10


Configuring Your WordPress Installation to Use MySQL at ScaleGrid

During your WordPress installation, you will be asked to specify your MySQL database details. Now that you’ve created a new MySQL deployment, database, user, and found your hostname, you can enter these details here to connect:


Once you submit, your WordPress installation should go through and be able to connect with your MySQL deployment hosted on ScaleGrid.

Additional Step For SSL-Enabled MySQL Deployments

If you have enabled SSL for your MySQL deployment, then your WordPress installation requires an additional setting that cannot be specified through the UI above. In such cases, before installing WordPress, you will have to edit a file called wp-config-sample.php and save it as wp-config.php.

You can follow detailed instructions here on editing your wp-config.php file. The sample below shows the MySQL section in the wp-config.php file, and the last line in this section indicates that MySQL has been configured with SSL:



Once you complete the installation, you will see that your WordPress site is up and running using ScaleGrid’s MySQL hosting as its database!