seravo / wordpress
Seravo WordPress project template
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 104
Watchers: 13
Forks: 54
Open Issues: 36
Type:project
Requires
- php: >=8.0
- composer/installers: ^1.0
- johnpbloch/wordpress-core: ^6.0
- johnpbloch/wordpress-core-installer: ^2.0
- koodimonni-language/fi: *
- koodimonni-language/sv_se: *
- koodimonni/composer-dropin-installer: ^1.0
- roots/bedrock-autoloader: ^1.0
- seravo/seravo-plugin: *
- vlucas/phpdotenv: ^5.0
- wpackagist-plugin/google-site-kit: *
- wpackagist-plugin/two-factor: *
- wpackagist-theme/twentytwentythree: *
- dev-master
- v2.1.0
- v2.0.1
- v2.0.0
- 1.3
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0
- 0.8.3
- dev-feature/devmode
- dev-feature/phpcs
- dev-feature/bcrypt
- dev-feature/captcha
- dev-bugfix/pr208
- dev-feature/pr-action
- dev-feature/debug-always
- dev-travis-test
- dev-feature/new-wp-vagrant
- dev-fix-private-key
- dev-replace-vagrant-steps
- dev-feature/docker-ci
- dev-dev-otto
- dev-feature/max-cpu-2
- dev-feature/gnitpick
- dev-feature/virtualbox-version-check
- dev-fix/uartmode1
- dev-feature/traefik
- dev-feature/git-hooks
- dev-beta
- dev-bugfix/composer-2.0
- dev-feature/update-dev-deps
- dev-test/gnitpick-test
- dev-feature/shellcheck
- dev-feature/vagrant-core-triggers
- dev-feature/slimdown-vagrantfile
- dev-feature/renewed-test-triggers
- dev-feature/update-upstream-files
- dev-dev-samuli
- dev-feature/docker
- dev-fix-osx-add-trusted-cert
- dev-fix-travis-gulp-error
- dev-feature-no-languagepacks
- dev-feature-custom-db-error-page
- dev-fix-db-port
- dev-allow-js-errors
This package is not auto-updated.
Last update: 2024-11-09 16:53:25 UTC
README
Seravo WordPress project template
Brought to you by Seravo.com.
A WordPress project layout for use with Git, Composer and Nginx. It also includes a config a Vagrant box and Docker image for local development.
This same project layout is used by default on all
Seravo.com instances for easy deployment workflow.
Contents of this repository equals to what you would have on the server in the
directory /data/wordpress/
.
Documentation
Please see our documentation at https://seravo.com/docs/ on general information about git workflow with this project template.
Installation
Please see our documentation at https://seravo.com/docs/development/how-to-install/ on how to install Vagrant and its dependencies.
Features
- Includes Nginx, MariaDB, PHP7, PHP8, Redis and Git for running WordPress in modern stack.
- Git hooks to test your code to make sure that only high quality code is committed into git
- Advanced WordPress acceptance tests with Codeception and headless Chrome
- PHP Codesniffer code style and quality analyzer
- Includes self-signed certs (and trust them automatically in OS X) to test https:// locally
- Xdebug and Webgrind for debugging and profiling your application
- Mailcatcher to imitate as SMTP server to debug mails
- Adminer for a graphical interface to manage your database
- BrowserSync as automatic testing middleware for WordPress
Credentials for vagrant
WordPress:
user: vagrant
password: vagrant
MariaDB (MySQL):
user: root
password: root
Development
The layout of this repo is designed in a way which allows storing the site in version control without exposing any confidential data. By default all sensitive data is ignored by git.
All plugins are handled by Composer so they are ignored by git. If you create
custom plugins, force add them to git so that they are tracked or add new lines
into .gitignore
to not ignore.
Example of not ignore line in .gitignore
:
!htdocs/wp-content/plugins/your-plugin/
If you create custom themes, they are automatically tracked in git.
Best way to develop custom plugins and themes is to add them into their own
repositories and install them by composer. You can do this by adding
composer.json
for your plugin/theme and then requiring them in your project
like:
"repositories": [ { "type": "vcs", "url": "https://github.com/your-name/custom-plugin.git" } ], "require": { "your-name/custom-plugin": "*" }
Updates
Vagrant will let you know as soon as a new version of the Vagrant box is available. However, site environment will not be updated automatically to newer one.
To download and update your Vagrant box to use the newest image run:
vagrant box update
vagrant destroy
vagrant up
Configuration
config.yml
Change name
in config.yml to change your site name. This is used in quite
some places in development environment.
Add production => domain
and production => ssh_port
to sync with your
production instance.
Add new domains under development => domains
before first vagrant up to have
extra domains.
See config-sample.yml
for more.
The Layout
The root of this repository equals the contents of the directory
/data/wordpress
in the Seravo.com instance.
├── config.yml # Project name, domains and other configuration
├── composer.json # Composer definition, used to pull in WordPress and plugins
├── composer.lock # Composer lock file. This is safe to delete and ignore as detailed dependency control is not relevant in WordPress.
├── gulpfile.js # Gulp example with correct paths
├── Vagrantfile # Vagrantfile for Seravo/WordPress Vagrant box
│
├── nginx # Custom modifications to Nginx which are also used in production
│ └── examples.conf # Some examples to get started
│ └── anything.conf # Your own config files can be named anything *.conf
│
├── scripts
│ ├── hooks # Git hooks for your project
│ │ ├── pre-commit # Run after every git commit
│ │ └── post-receive # Run after every git pull/push
│ │
│ ├── WordPress
│ │ └── Installer.php # Composer helper for WordPress installation
│ │
│ └── run-tests # Bash script as an interface for your tests in Seravo's production and development environments
│
├── vendor # Composer packages go here
└── htdocs # The web root of your site
├── wp-content # Directory moved out of WordPress core for git compatibility
│ ├── mu-plugins
│ ├── plugins
│ ├── themes
│ └── languages
├── wp-config.php
├── wp-load.php
├── index.php
└── wordpress # WordPress core
├── wp-admin
├── index.php
└── ...
Credits
- Directory layout heavily inspired by roots/bedrock
- Development stack inspired by VVV
Copyright Seravo Oy, 2015–2023 and contributors. Available under the GPLv3 license.