The Ultimate Wagtail Developers Course

Installing Wagtail on MacOS and Windows

We'll guide you through the essential steps to install Wagtail CMS on both Windows and macOS/Unix-based systems. Don't worry; we'll be using the command line, but it's easier than you think! Whether you're a Windows warrior or a macOS maverick, you'll have Wagtail up and running in no time.

Installing Wagtail on MacOS and Windows

# Install Wagtail on MacOS ## Install Homebrew First, install Homebrew, which is a package manager for macOS. Open Terminal and paste the following command: ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` ## Install Python and Pip Wagtail requires Python. Install it using Homebrew: ```bash brew install python3 ``` ## Create a Virtual Environment Create a directory for your Wagtail project and navigate into it: ```bash mkdir my_wagtail_project cd my_wagtail_project ``` Now, create a virtual environment: ```bash python3 -m venv .venv ``` Activate the virtual environment: ```bash source .venv/bin/activate ``` ## Install Wagtail Install Wagtail using pip: ```bash pip install wagtail ``` ## Create a Wagtail Project Create a new Wagtail project: ```bash wagtail start blog . ``` Navigate into your new Wagtail site: ```bash cd blog ``` ## Install Dependencies Install the required packages: ```bash pip install -r requirements.txt ``` ## Initialize Database Initialize the database (it uses SQLite by default): ```bash ./manage.py migrate ``` ## Create an Admin User Create an admin user to manage the CMS: ```bash ./manage.py createsuperuser ``` Follow the prompts to create a user. ## Run Development Server Run the development server: ```bash ./manage.py runserver ``` You should see output that says the development server is running. Open your web browser and go to `http://127.0.0.1:8000/` to see your new Wagtail site. # Install Wagtail on Windows ## Install Python and Pip 1. **Download Python**: Go to the [official Python website](https://www.python.org/downloads/windows/) and download the installer. 2. **Install Python**: Run the installer. Make sure to check the box that says "Add Python to PATH" during installation. ## Open Command Prompt Open a Command Prompt window. You can do this by searching for "cmd" in the Start menu. ## Create a Virtual Environment 1. Create a new directory for your Wagtail project and navigate into it: ```cmd mkdir my_wagtail_project cd my_wagtail_project ``` 2. Create a virtual environment: ```cmd python -m venv venv ``` 3. Activate the virtual environment: ```cmd .\venv\Scripts\activate ``` ## Install Wagtail Install Wagtail using pip: ```cmd pip install wagtail ``` ## Create a Wagtail Project 1. Create a new Wagtail project: ```cmd wagtail start mysite ``` 2. Navigate into your new Wagtail site: ```cmd cd mysite ``` ## Install Dependencies Install the required packages: ```cmd pip install -r requirements.txt ``` ## Initialize Database Initialize the database (SQLite by default): ```cmd python manage.py migrate ``` ## Create an Admin User Create an admin user for the CMS: ```cmd python manage.py createsuperuser ``` Follow the prompts to create your user. ## Run Development Server Run the development server: ```cmd python manage.py runserver ``` Your development server should start. Open your web browser and go to `http://127.0.0.1:8000/` to see your new Wagtail site. --- And that's it! You should have a working Wagtail CMS on your Windows machine. To access the admin interface, just go to `http://127.0.0.1:8000/admin` and log in with the superuser credentials.

Community

Comments and questions are hidden until you enroll in this course

Lesson Information

Lesson
Installing Wagtail on MacOS and Windows
Description
We'll guide you through the essential steps to install Wagtail CMS on both Windows and macOS/Unix-based systems. Don't worry; we'll be using the command line, but it's easier than you think! Whether you're a Windows warrior or a macOS maverick, you'll have Wagtail up and running in no time.
Duration
9m 38s