Service: Wordpress - EyevinnOSC/community GitHub Wiki
The WordPress open source project has evolved in progressive ways over time—supported by skilled, enthusiastic developers, designers, scientists, bloggers, and more. WordPress provides the opportunity for anyone to create and share, from handcrafted personal anecdotes to world-changing movements. This is a tutorial on how launch a WordPress powered site in Open Source Cloud.
- If you have not already done so, sign up for an OSC account.
- Active MariaDB subscription in Open Source Cloud or a MySQL server hosted elsewhere. In this tutorial we will use the MariaDB service.
First thing is to setup a MySQL database and in this tutorial we will use the MySQL compatible service MariaDB available in Open Source Cloud.
Create a MariaDB database instance with the following settings. The rootpassword
secret variable holds the admin password for the database and has been created in advance:

After a short while you will now have a database up and running. Copy the IP and port in the TCP field as this will be later used in this guide.

Now when the database is up and running we can continue with creating a Wordpress instance. Navigate to the Wordpress service in Open Source Cloud.
Create two secrets for the database username and password that will be used.

Next step is to create the instance. Click on the button "Create wordpress" and enter the following settings:

Then press the Create button.
When the instance is up and running you can click on the instance card and a new window will open where you can start to configure your Wordpress site.

And that's it. Now you have a fresh Wordpress site up and running that you can configure and publish.
It is recommended to configure a CDN for accelerated delivery and possibility to use a custom domain name.
In the Cloudfront service on the AWS console, click “Create Distribution”. Set the origin domain as <tenantId>-guide.wordpress-wordpress.auto.prod.osaas.io
, the one you just created and where <tenantId>
is the id of your tenant. Set the origin protocol policy to “HTTPS only”, to enforce only https between CloudFront and the origin (your instance in Open Source Cloud).
For the viewer behavior, set “Redirect http to https”. Allow all HTTP methods (GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE). For the Cache settings, leave the defaults. We’ll update these later. Now tap the “Create distribution” button to create your CloudFront distribution.
Create a Origin Request Policy called WordpressStatic
with the following settings:
- Headers: None
- Cookies: None
- Query strings: None
Create another Origin Request Policy called WordpressDynamic
with the following settings:
- Headers: Include [
CloudFront-Is-Tablet-Viewer
,CloudFront-Forwarded-Proto
,CloudFront-Is-Mobile-Viewer
,CloudFront-Is-Desktop-Viewer
] - Cookies: Include [
comment_*
,wordpress_*
,wp-settings-*
] - Query strings: All
And the final Origin Request policy called WordpressDynamicAdmin
with these settings:
- Headers: Include [
CloudFront-Is-Tablet-Viewer
,CloudFront-Forwarded-Proto
,CloudFront-Is-Mobile-Viewer
,CloudFront-Is-Desktop-Viewer
] - Cookies: All
- Query strings: All
Then we will create a Cache Policy we call WordpressDynamicContent
with these settings:
- Minimum TTL: 60
- Default TTL: 60
- Maximum TTL: 60
- Headers: Include [
CloudFront-Is-Tablet-Viewer
,CloudFront-Forwarded-Proto
,CloudFront-Is-Mobile-Viewer
,CloudFront-Is-Desktop-Viewer
,Authorization
,X-WP-Nonce
] - Cookies: Include [
comment_*
,wordpress_*
,wp-settings-*
] - Query strings: All
What is important is to not forward Host
header to the origin.
Then assign these policies according to the screenshot below: