Bedrock is a modern WordPress stack that helps you get started with the best development tools and project structure.
This is a modified version using Timber, WP Steroid.
This project is designed to bootstrap a custom-made website without using a theme, utilizing custom fields with ACF or Carbon Fields instead.
- Better folder structure
- YML configuration
- Permalink configuration for custom post types and taxonomies
- Maintenance mode
- Backup download in dev mode
- Build hook
- Disabled automatic updates
- Enhanced security
- Better GUID using RFC 4122 compliant UUID version 5
- Multisite images sync (for multisite as multilingual)
- SVG support
- Better performance
- Radio type for taxonomies
- Multisite post deep copy (with multisite-language-switcher plugin)
- Custom datatable support with view and delete actions in admin
- Google Translate or DeepL integration
- Optimizations
- Dependency management with Composer
- Easy WordPress configuration with environment specific files
- Environment variables with Dotenv
- Enhanced security (separated web root and secure passwords with wp-password-bcrypt)
- Image options
- Maintenance support
- Admin pages removal
- WYSIWYG MCE editor
- Feature support
- Multisite configuration
- ACF configuration
- Menu
- Custom post types
- Custom taxonomies
- Blocks
- Page, post, and taxonomy templates
- Page state
- Post format
- External table viewer
- Advanced roles
Documentation is available on Gitbook
- PHP >= 8.1 with GD ( jpeg, webp ), pdo_mysql, mysqli
- Curl, Git, Zip, Composer 2
- Node 18
- Mysql >= 5.7 or Maria DB >= 10.4
- Nginx or Apache with mod_rewrite module
-
Install vendor
$ composer install
-
Update environment variables in the
.env
file. Wrap values that may contain non-alphanumeric characters with quotes, or they may be incorrectly parsed.
- Database variables
DB_NAME
- Database nameDB_USER
- Database userDB_PASSWORD
- Database passwordDB_HOST
- Database host- Optionally, you can define
DATABASE_URL
for using a DSN instead of using the variables above (e.g.mysql://user:password@127.0.0.1:3306/db_name
)
WP_ENV
- Set to environment (development
,staging
,production
)WP_HOME
- Full URL to WordPress home (http://wordpress.io)AUTH_KEY
,SECURE_AUTH_KEY
,LOGGED_IN_KEY
,NONCE_KEY
,AUTH_SALT
,SECURE_AUTH_SALT
,LOGGED_IN_SALT
,NONCE_SALT
- Generate with WordPress salts generator
-
Build sources
$ npm install && npm run build
-
Set the document root on your webserver to
public
folder:/path/to/site/public/
-
Allow 'write' permissions to
/path/to/site/var/
and/path/to/site/public/app/uploads
-
Go to the
WP_HOME
url and install WordPress -
Login as admin, activate
Timber
theme -
Activate also
WordPress on Steroids
andAdvanced Custom Fields
plugins -
Add a new page and start playing with blocks !
-
Remove
.demo
folder and update Readme.md
-
Do a
Fresh install
, from step 1 to 5 -
Import
.demo/database.sql
file in your database ( demo url in sql file is http://wordpress.io, admin login : demo/demo ) or install WordPress
If you need to change the url, perform a search & replace in the demo.sql, and execute in bash php bin/fix-serialisation .demo/database.sql
- Remove
.demo
folder and update Readme.md
- Edit
/config/app.yml
to edit WordPress configuration ( custom post type, custom taxonomy and so much more ) - Edit twig files in
/templates
- Add specific site functions in
/src/Site.php
- Edit page context in
/src/Controller
- Run dev server do rebuild sources
$ npm run dev-server
Edit composer.json, replace "wpackagist-plugin/advanced-custom-fields": "^6.3.6"
with "htmlburger/carbon-fields": "^3.6"
You can also add "metabolism/carbon-fields-urlpicker": "^3.0"
to add an url picker field
ACF PRO can be installed using Composer, similar to how the free plugin can be installed using WordPress Packagist.
Please read the documentation on ACF Website
Project is shipped with Docker files samples.
Feel free to update WP_HOME and WP_SITEURL in docker-compose.yml
and server_name in .docker/nginx/default.conf
Run the project using
docker-compose build
docker-compose up -d
Access WordPress admin at http://localhost:8000
Stop containers
docker-compose down
Remove all stopped containers
docker system prune -a
Remove orphaned volumes
docker volume rm $(docker volume ls -q)