Let's make our first Wagtail website

Hello, so I just learnt about wagtail and it's use cases and how to create wagtail website so I will just write what I learnt through this tutorial.

Whether you're a web developer, designer, or content creator, this tutorial will provide you with step-by-step instructions on how to build a Wagtail website from scratch.

First of all what is Wagtail?

Wagtail is open-source Python CMS ( ) being trusted by organisations like NASA, NHS, Caltech,University of Penselvania.

If I'd to explain wagtail to a 5 year old kid, here is how it will look like:-

Wagtail is like a tool that helps people make websites. It's like a box of building blocks that you can use to create a website by putting different things together, like text, pictures, videos, and more. It also helps grown-ups who take care of websites to organize and manage all the things that go on the website, like checking if everything looks good and deciding when to show things to other people. Just like how you use your toy blocks to build a tower, Wagtail helps grown-ups build websites!

Now I guess you have got a bit idea of what exactly Wagtail is so without a further let's get straight toward making our first wagtail website.

Steps to follow:-

We just have to run this commands and believe me at the end of the tutorial you will be able to create your first website. Just open your terminal and run the commands in terminal.

First let's check the whether we have an appropriate version of Python 3:

  python --version

The output will look like this: alt text

Create and activate a virtual environment:

Just run this command

  py -m venv mysite\env
mysite\env\Scripts\activate.bat
# or:
mysite\env\Scripts\activate

The output will look like this: alt text

Install Wagtail

  pip install wagtail

The output will look like this: alt text

Generate your site

  wagtail start mysite mysite

The output will look like this: alt text

Install project dependencies

  cd mysite
  pip install -r requirements.txt

The output will look like this: alt text

Create the database

    python manage.py migrate

The output will look like this: alt text

Create an admin user

    python manage.py createsuperuser

The output will look like this: alt text

Start the server:

python manage.py runserver

The output will look like this: alt text

If everything worked well, we will have our site running on http://127.0.0.1:8000/

And you will see a screen something like this:

alt text

Now when will click on Admin interface, our admin interface will look like this at http://127.0.0.1:8000/admin :

alt text

Now we have different features which we can use just link pages, images, documents etc.

When we will click on images and we will upload a image it will look like this:

alt text

Now, you have successfully created your first wagtail website and you can just explore more about it at https://docs.wagtail.org/en/stable/getting_started/tutorial.html .

I hope this tutorial will help you out to make your first wagtail website :)

🔗 You can connect with me here:

portfolio linkedin twitter