2022-03-09 11:48:19 +00:00
```{eval-rst}
2021-04-20 09:24:17 +00:00
:hidetoc: 1
```
2021-02-26 08:44:40 +00:00
# Getting started
2014-09-11 15:01:22 +00:00
2022-03-09 11:48:19 +00:00
```{note}
2021-02-26 09:00:08 +00:00
These instructions assume familiarity with virtual environments and the
2022-03-09 11:48:19 +00:00
[Django web framework ](https://www.djangoproject.com/ ).
For more detailed instructions, see [](tutorial).
To add Wagtail to an existing Django project, see [](integrating_into_django).
2021-02-26 09:00:08 +00:00
```
2015-05-28 09:12:48 +00:00
2021-02-26 08:44:40 +00:00
## Dependencies needed for installation
2015-05-28 09:12:48 +00:00
2023-02-14 16:53:00 +00:00
- [Python 3 ](https://www.python.org/downloads/ ).
2022-10-20 23:31:18 +00:00
- **libjpeg** and **zlib** , libraries required for Django's **Pillow** library.
See Pillow's [platform-specific installation instructions ](https://pillow.readthedocs.io/en/stable/installation.html#external-libraries ).
2015-05-28 09:12:48 +00:00
2021-02-26 08:44:40 +00:00
## Quick install
2018-10-27 08:20:55 +00:00
2022-10-10 23:30:15 +00:00
Run the following commands in a virtual environment of your choice:
2018-10-27 08:20:55 +00:00
2021-02-26 09:01:23 +00:00
```sh
2022-10-13 06:25:19 +00:00
pip install wagtail
2021-02-26 08:44:40 +00:00
```
2015-05-28 09:12:48 +00:00
2022-10-10 23:30:15 +00:00
(Installing wagtail outside a virtual environment may require `sudo` . sudo is a program to run other programs with the security privileges of another user, by default the superuser)
2016-11-28 01:30:44 +00:00
2022-10-20 23:31:18 +00:00
Once installed, Wagtail provides a command similar to Django's `django-admin startproject` to generate a new site/project:
2015-05-28 09:12:48 +00:00
2021-02-26 09:01:23 +00:00
```sh
2022-10-13 06:25:19 +00:00
wagtail start mysite
2021-02-26 08:44:40 +00:00
```
2015-05-28 09:12:48 +00:00
2021-02-26 08:44:40 +00:00
This will create a new folder `mysite` , based on a template containing everything you need to get started.
2019-04-09 13:55:30 +00:00
More information on that template is available in
2021-02-26 09:06:11 +00:00
[the project template reference ](/reference/project_template ).
2015-05-28 09:12:48 +00:00
2021-02-26 08:44:40 +00:00
Inside your `mysite` folder, run the setup steps necessary for any Django project:
2016-11-28 01:30:44 +00:00
2021-02-26 09:01:23 +00:00
```sh
2022-10-13 06:25:19 +00:00
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
2021-02-26 08:44:40 +00:00
```
2015-05-28 09:12:48 +00:00
2021-02-26 08:44:40 +00:00
Your site is now accessible at `http://localhost:8000` , with the admin backend available at `http://localhost:8000/admin/` .
2015-05-28 09:12:48 +00:00
2019-04-09 13:55:30 +00:00
This will set you up with a new stand-alone Wagtail project.
2022-10-20 23:31:18 +00:00
If you'd like to add Wagtail to an existing Django project instead, see [Integrating Wagtail into a Django project ](/getting_started/integrating_into_django ).
2015-05-28 09:12:48 +00:00
There are a few optional packages which are not installed by default but are recommended to improve performance or add features to Wagtail, including:
2022-10-22 12:17:03 +00:00
- [Elasticsearch ](/advanced_topics/performance )
- [Feature Detection ](image_feature_detection )
2022-03-09 11:48:19 +00:00
```{toctree}
---
maxdepth: 1
---
tutorial
demo_site
integrating_into_django
the_zen_of_wagtail
2021-02-26 09:08:12 +00:00
```
2023-02-14 16:53:00 +00:00
(common_installation_issues)=
## Common issues
### Python is not available in `path`
```sh
python
> command not found: python
```
For detailed guidance, see this guide on [how to add Python to your path ](https://realpython.com/add-python-to-path/ ).
### python3 not available
```sh
python3 -m pip install --upgrade pip
> command not found: python3
```
If this error occurs, [the `python3` can be replaced with `py` ](https://docs.python.org/3/faq/windows.html#how-do-i-run-a-python-program-under-windows ).