Giter VIP home page Giter VIP logo

project-wordpress's Introduction

WordPress Project Boilerplate

Project boilerplate for developing WordPress projects locally or deploying them to the Sitepilot managed hosting platform.

Quickstart

Run the following commands to create and start a new WordPress project locally.

# Create a new project
composer create-project sitepilot/project-wordpress my-site

# Start containers
docker-compose up -d

Navigate to http://localhost:8080 to access your WordPress installation.

WordPress Configuration

Composer is used to manage dependencies like WordPress version and which plugins / themes are installed.

Install a plugin

WordPress Packagist is already registered in the composer.json file so any plugin from the WordPress Plugin Directory can easily be required.

To add a plugin, add it under the require directive or use composer require <namespace>/<packagename> from the command line. If it's from WordPress Packagist then the namespace is always wpackagist-plugin.

Install a theme

Themes can also be managed by Composer but should only be done so under two conditions:

  1. You're using a parent theme that won't be modified at all.
  2. You want to separate out your main theme and use that as a standalone package.

Under most circumstances, we recommend NOT doing #2 and instead keeping your main theme as part of your app's repository.

Just like plugins, WordPress Packagist maintains a Composer mirror of the WordPress theme directory. To require a theme, just use the wpackagist-theme namespace.

Update

Updating your WordPress version (or any plugin) is just a matter of changing the version number in the composer.json file. Then running composer update will pull down the new version.

Dependabot can be used to automate updates of your Composer dependencies in your project, including WordPress itself.

Runtime Configuration

Environment

You can change your project's runtime configuration by modifying the environment variables in .sitepilot/environment.

PHP configuration

You can change your project's PHP-configuration by modifying .sitepilot/config/php/php.ini. You can find a list of available options here.

Nginx configuration

You can extend your project's Nginx-configuration by adding files to the appropriate .sitepilot/config/nginx/*.d folder.

  • vhost-pre.d - included before the default vhost configuration.
  • vhost-post.d - included after the default vhost configuration.
  • php-allowed-list.d - allow direct access to PHP-files.

Document root files

Your WordPress installation is managed by Composer and lives in the public folder. Every modification / addition to the public folder will be overwritten after a Composer install or update. Add files which need to live in the document root to the root folder.

Deploy ๐Ÿš€

This stack is optimized for automagically deploying your project to the Sitepilot managed hosting platform. You can request access to our fast and developer-friendly platform through our support department.

Deploy Configuration

You can modify .sitepilot/deploy/00-install or add scripts to the .sitepilot/deploy folder to change or extend the commands which will run after pulling your code onto the server.

Credits

This project was inspired by the Bedrock WordPress boilerplate.

project-wordpress's People

Contributors

dependabot[bot] avatar nbejansen avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.