Video Tour of Wagtail 8.0
Published September 19, 2026
This video is from Wagtail CMS 2023 .
In this video, you will learn how to deploy Wagtail, an open source content management system built on Django, to Google App Engine’s new second-generation Python runtime.
Setting Up a Python Development Environment → http://bit.ly/2CDdn3N
Install the ‘gcloud’ Google Cloud SDK → http://bit.ly/2QAbYUn
Install the Cloud SQL Proxy → http://bit.ly/2SmPRNL
Storing secrets → http://bit.ly/2AjwuON
Google App Engine Python 3 Standard Environment Documentation → http://bit.ly/2PIql3t
Stay up to date by subscribing to the Google Cloud Platform Channel → http://bit.ly/GCloudPlatform
Wagtail is a Django-based content management system that can run on Google App Engine’s Python 3 standard runtime. The deployment setup uses PostgreSQL on Cloud SQL, with Cloud SQL Proxy providing a secure local development connection instead of exposing the database directly. The process covers creating a Wagtail project, configuring development and production settings, adding the PostgreSQL driver, migrating the database, creating an administrator, collecting static files, and deploying with `gcloud app deploy`. App Engine then serves the site at an `appspot.com` address, provides access to Wagtail’s admin interface, and automatically scales as traffic grows; production applications should store database credentials and Django secret keys in a proper secret-management system rather than source code.
Summarised automatically from the transcript.
Automatically transcribed, so expect mistakes in names and technical terms.
I'm Dustin Ingram, developer advocate for Google Cloud Platform. Today I'm going to show you how you can run a Wagtail application on Google App Engine. Wagtail is an open source content management system built on Django. It's used by thousands of organizations worldwide with a strong community. In fact, Wagtail on App Engine is what powers the Google Cloud blog at cloud. google. com slash blog. It also looks great, is focused on user experience, and offers precise control for both designers and developers. App Engine makes it easy to deploy your Django app to the cloud, and since Wagtail is built with Django, it's easy to get up and running with Wagtail as well. Also, similar to the Django project, Wagtail recently announced that it has dropped support for Python 2, which makes it a great fit for the Python 3 runtime on the App Engine
standard environment. A content management system consists primarily of three parts. An admin interface for creating and updating your content, a database for storing your content, and a front end for rendering your content. Wagtail comes with its own admin interface out of the box, so the first thing we need to do to get started is create a new database for our project. Wagtail works with a number of different databases. We'll choose Postgres. On the Google Cloud Platform Console, we'll go to the Cloud SQL instances page. Here we'll create a new instance and select Postgres 9. 6. We'll just use a development database for now, but once your app starts getting lots of traffic, you'll probably want to use a production database instead.
Next, we'll specify an instance ID and default password. Once the instance is initialized, we'll select it. Nice, ready to go. Select the copy button next to instance connection name and hang on to this for later. This string is what we'll use to tell our app how to connect to our database. Now we'll go local. Being able to run your app locally makes it easier to test changes as you're working without needing to redeploy every time. In order to run our Wagtail app locally, we'll need a way to connect to the database we just created from our local machine. We could connect directly to it.
But this would require that we allow our database to accept incoming connections directly from our local IP address, which would make it slightly less secure. Instead, we'll use a tool called CloudSQL Proxy. This is a utility that can run on our development machine that creates a secure tunnel between our machine and the Cloud SQL database. Then we could configure our app to talk to this local proxy instead when running in development mode. Installing the Cloud SQL proxy is easy. See the link in the video description for instructions for your platform. We'll start the Cloud SQL proxy with this command. You'll use the instance name you copied in the previous step here. We'll leave this running in a separate terminal while we continue. Now, in a new terminal, we'll install the Wagtail package locally.
I'm already in a virtual environment that I created for this project. If you're not familiar with virtual environments, see the link in the video description for guides for setting up and activating a virtual environment. I highly recommend that any Python project starts with its own virtual environment. Installing the Wagtail package gives us the Wagtail command, which we can use to generate a cookie cutter Wagtail project. We'll call ours MySite, so we'll use the command Wagtail Start MySite. This will create a directory called MySite, where our Wagtail app will live. Let's go into that directory and see what our starter app looks like. There's a few things in here that might look familiar. Most of the core of our app lives in MySite. The search and home directories are the sub pages that we get by default.
We need to update our Wagtails app settings so that it has the right information to interact with our database. The development settings go in a file at mySite slash settings slash dev. py. We'll tell it how to interact with our Cloud SQL proxy, which should still be running, by specifying localhost as our host. Now we need to do the same for our production settings. Ideally, any secret like a database password would be encrypted with an encryption key from Cloud Key Management Service and held in cloud storage, only to be decrypted at runtime. But we'll just include our password in the source code here to simplify things. But be sure to read the guide to secret management in the video description Similarly, we'll set a secret key, which will be used for cryptographic signing to secure our tokens, cookies, etc.
by just assigning it in a source. However, in production, this should be stored as a secret as well. We'll also need to tell our app which host names it should respond to. App Engine gives you an appspot. com domain by default, so we'll use that here. Next, we're going to migrate our database and start up our app locally. Since we opted to use Postgres as our database, we'll need to add the Psycho PG2 Python package to the requirements. txt file at the root of our project's MySite directory. Then, let's install everything. We'll run the migrate command to get our database initialized Finally, we'll create an administrator account that we'll use to log into our Wagtail app.
Running python manage. py create superuser will prompt us for our username and password for our admin Wagtail user. Now we can run Python manage. py run server to start the server locally. The Wagtail app will be visible on localhost at port 8000 by default. Let's check it out in our browser by visiting http colon slash slash 127. 0. 0. 18000. Once there, we should see this generic welcome message. Now that we have the app configured, let's deploy it. There's three things we need to do before deploying. First, we need to collect all our static assets, like CSS and JavaScript, into a single directory. The collect static command will do this for us. Next, we need to create a main.
py file. This is where AppEngine looks for an app variable, which should be your application. Wagtail puts this elsewhere and calls it application instead, so we just need to connect the dots. Finally, we need to create an app. yaml file to hold our app engine configuration. We'll tell it to use the Python 3 runtime, and we'll set up handlers for our static assets and for our other routes. We'll also tell it to use our production settings once deployed. When we're done, our MySite directory should look something like this. Now all we need to do is deploy with gcloud app deploy. Once the deployment is finished, we can go visit our app at its URL on appspot.
com, and we'll see that same familiar welcome screen. We can also sign in with the super user account that we created before. Looking great! We've got a content management system. Now all that's left to do is add the content, which is easy with Wagtail's web interface. From here, you might also want to start working on your app's front end to create a more engaging experience for your visitors, or add some models to begin defining your business logic. I've shown you how to set up a Cloud SQL database, create a new Wagtail project, and deploy it to App Engine 's new Python 3 runtime. And I'm confident that you'll be able to take this and build something great on Google Cloud. The best part about App Engine is that it grows with your application.
When you aren't getting traffic, you don't pay anything. And as your app becomes more popular and traffic increases, it scales automatically to meet that demand. Stay tuned for the next episode where I'll show you how to use StackDriver to monitor your Python 3 app. Feel free to ask questions in the comments below, and if you like this video, please subscribe to the Google Cloud Platform channel for more videos like this. Thanks for watching.
Create a PostgreSQL 9.6 Cloud SQL instance, save its instance connection name, and configure Wagtail to use it. For local development, connect through the Cloud SQL Auth Proxy rather than exposing the database directly to your IP address.
Discussed at 0:50Install Wagtail in a Python virtual environment, generate a project with `wagtail start`, add the PostgreSQL driver, run migrations, create a superuser, and start Django’s development server on port 8000.
Discussed at 3:10Use `localhost` for the development database when connecting through the proxy, and configure the production settings with the Cloud SQL connection information and App Engine host name. Database passwords, secret keys, and other secrets should be stored securely rather than committed to source code.
Discussed at 3:55Collect static files, create `main.py` exposing the application as `app`, and add an `app.yaml` specifying the Python 3 runtime, handlers, and production settings. Then deploy the project with `gcloud app deploy` and visit its App Engine URL.
Discussed at 5:30Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.
Published September 19, 2026
Published July 9, 2026
Published May 20, 2026
Published April 16, 2026
Published April 1, 2026
Published March 10, 2026