A toolkit for creating a new professional WordPress project with deployments. Originally based on Roots/bedrock.
MIT License
Dudestack is a modern WordPress toolkit that helps you get started with the best development tools and project structure - just like Bedrock.
The idea is to have just one command for starting the project. Saves dozens of hours easily in each project start when DRY (Dont-Repeat-Yourself) stuff are fully automated!
After setting up, you can start a new project just by running:
createproject
TL;DR: You can test dudestack right away in just two minutes by following our Air starter theme instructions.
Please note: The main focus of dudestack is on how it works for our company and staff. This means it may not work for you without tweaking. Please ask a question by addressing an issue if something goes south.
We're constantly developing our development workflow. Honestly, we've been through hundreds of articles, tools and scripts. Went with regular WordPress structure, different wp-configs and Dandelion for a long time, but realized in some point we have to get some sense to it all. Setting up things should not be the most time consuming task when starting a new project.
We love Bedrock, which is a is a modern WordPress stack that helps you get started with the best development tools and project structure. Bedrock contains the tools we've been already using, but more. In fact, we are proud to say that most of this stack is based on Bedrock.
Like bedrock, dudestack saves you hours when starting a new project.
Well, this is mainly a toolbox for a web design/development agency for a local Finnish WordPress-company, Digitoimisto Dude Oy as well as backup purposes and to show off how we roll. You should use this only if you really like how we do things.
Despite the fact we love most of Bedrock, we noticed there are some things we don't like.
app/
by default, then in web/
. We prefer content/
, like it was wp-content
for a reason. It describes it better, since we do not want this to be too programming-oriented, but more front end developer -friendly (for developing WordPress themes and functions)create-project
is awesome, but we need more. You still need to do stuff after create-project
and our createproject
-starting script is designed for automating the rest.xcode-select --install
and homebrew with latest updatesmkdir -p $HOME/Projects && cd $HOME/Projects && git clone [email protected]:digitoimistodude/dudestack.git
cd $HOME/Projects/dudestack/bin && bash macos.sh
If you use WSL/Windows:
cd $HOME/Projects/dudestack/bin && bash wsl.sh
Creating a new project has a lot of configs to do. We wanted to automate most of it by creating a bash script called createproject.sh
. The script assumes:
When you run createproject
it looks like this:
composer create-project
with dudestack settingscreateproject
you should run newtheme.sh under air-light/bin. This will generate the WordPress theme and import latest devpackages that contain gulp, stylelint, webpack, etc. for modern WordPress Theme developmentPlease note:
createproject.sh
and composer.json
based on your own needs.To start a new project, run createproject
and have fun.
Edit your composer.json
and add these lines inside respository, separated by commas:
As per pivvenit/acf-composer-bridge, add to "repositories" section:
{
"type": "composer",
"url": "https://pivvenit.github.io/acf-composer-bridge/composer/v3/wordpress-plugin/"
},
Then to "requires":
"advanced-custom-fields/advanced-custom-fields-pro": "*",
As per gtap-dev/gravityforms-composer-installer, add to "repositories" section (remember to update to the latest version from here):
{
"type": "package",
"package": {
"name": "gravityforms/gravityforms",
"version": "2.5.14.3",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://www.gravityhelp.com/wp-content/plugins/gravitymanager/api.php?op=get_plugin&slug=gravityforms&key={%WP_PLUGIN_GF_KEY}"
},
"require": {
"composer/installers": "^1.4",
"gotoandplay/gravityforms-composer-installer": "^2.3"
}
}
},
Then to "requires":
"gravityforms/gravityforms": "*",
You will need Redis and PHP Redis installed in order to install this package.
Add to "repositories":
{
"type": "composer",
"url": "https://objectcache.pro/repo/"
}
Then to "requires":
"rhubarbgroup/object-cache-pro": "^1.13.0"
Add to "repositories":
{
"type": "package",
"package": {
"name": "relevanssi/relevanssi-premium",
"version": "2.20.3",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://www.relevanssi.com/update/get_version.php?api_key=xxx&version=2.20.3"
}
}
},
Then to "requires":
"relevanssi/relevanssi-premium": "2.20.3",
Add to "repositories":
,
{
"type": "package",
"package": {
"name": "polylang/polylang-pro",
"type": "wordpress-plugin",
"version": "3.2.5",
"dist": {
"type": "zip",
"url": "https://plugins.dude.fi/polylang-pro_3.2.5.zip"
}
}
},
Then to "requires":
"polylang/polylang-pro": "3.2.5",
In the similar manner you can add other paid plugins that don't have composer repository. We've covered with this almost every such plugin we use.
When getting the new zip, I use this function in my ~/.bashrc
:
function plugin() { scp -r $@ '[email protected]:~/path/to/plugins/'; }
So with simple ssh-pairing (passwordless login), I can upload a plugin by simple command: plugin gravityforms_1.8.20.5.zip
and then just change version and composer update
. DRY, you see.
WP-Cli is included in dudestack per project via composer.json
and won't work by default globally. You'll need this alias on your Mac or Linux .bashrc
or .bash_profile
file:
alias wp='./vendor/wp-cli/wp-cli/bin/wp'
Our default choice for the SEO plugin is The SEO Framework whihc is nice, clean and simple solution that suits most of the projects.
In case client is familiar with Yoast, requests it or the project is blog-centric, switching to Yoast SEO is possible. In that case, replace the wpackagist-plugin/autodescription
package in composer.json
with wpackagist-plugin/wordpress-seo
. It's also highly recommended to install wpackagist-plugin/so-clean-up-wp-seo
to clean the bloat from UI.
Feel free to post any issue or question if you have one.