🚧 This chapter is work in progress (WIP) . Happy to hear your feedback / ideas!
Installing WordPress with DDEV is super simple. DDEV has already built-in support for the WordPress Command Line Tools (WP-CLI).
If you create a DDEV project with
ddev config --project-type=wordpress, a wp-config.php is created which already contains the correct database connection settings (db, db, db) for DDEV.
Therefore it is really easy to install a fresh WordPress with just a few commands:
The commands shown in this video:
mkdir my-wp-site cd my-wp-site/ # create a new DDEV project inside the newly created folder # (the primary URL is automatically set to https://<folder>.ddev.site) ddev config --project-type=wordpress ddev start # download latest WordPress (via WP-CLI) ddev wp core download # finish the installtion in your browser: ddev launch
ACF Blocks + Svelte + Vite 🧡
Pulling WordPress (ddev pull)
DDEV offers an incredible feature called Hosting Provider Integration. This enables writing little scripts which can pull databases and files from remote servers to your local development project.
I wrote an example online tool to help you get started with the basic configuration:
Here is an example video for SSH pull:
Pull via SSH
- Generator: https://ddev-pull-wp.mandrasch.eu/
- Docs: https://github.com/mandrasch/ddev-pull-wp-scripts#️--ddev-pull-ssh
More information, maybe slightly outdated:
Pull via SSH into Gitpod / GitHub Codespaces
Did not try this yet
Pull via BackWPup
Don't want to fiddle around with SSH? You can just use the free BackWpUp plugin to create a
.zip backup and import it into a DDEV WordPress project.
Pull via BackWPup into GitPod
You can even use DDEV in your browser (via Gitpod cloud), if you don't have a local development environment currently setup. This could be also a good way to let designers participate in PHP projects in future:
TODO: Add screencast TODO: Add more information
Roots Sage (+ Roots Bedrock) (old experiment)
Roots offers "Advanced WordPress Development Tools". I decided to test them with DDEV:
Current open question regarding HMR and internal links
Timber (old experiment)
Timber "helps you create fully-customized WordPress themes faster with more sustainable code. With Timber, you write your HTML using the Twig Template Engine separate from your PHP files.".
I created some example repositories, v2 is currently in beta and my demo is not fully functional yet:
- https://github.com/mandrasch/ddev-wp-timber-v1 (stable)
- https://github.com/mandrasch/ddev-wp-timber-v2 (beta)
Connect with community 🤗
There is a dedicated #WordPress-Channel on DDEV discord!