{"id":19943121,"url":"https://github.com/blacktrs/modern-wp","last_synced_at":"2026-05-01T20:32:38.593Z","repository":{"id":57711706,"uuid":"422282086","full_name":"blacktrs/modern-wp","owner":"blacktrs","description":"ModernWP is an enhanced WordPress boilerplate based on the pure Symfony Framework and Roots Bedrock.","archived":false,"fork":false,"pushed_at":"2023-08-26T13:43:51.000Z","size":153,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-12T11:03:31.315Z","etag":null,"topics":["php","symfony","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blacktrs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-28T16:42:16.000Z","updated_at":"2023-08-28T16:28:39.000Z","dependencies_parsed_at":"2025-01-12T05:08:45.806Z","dependency_job_id":"35b5810c-3e1f-41d5-a1fc-2a7ed18bb46d","html_url":"https://github.com/blacktrs/modern-wp","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"f4d6373f8160af908b934e7d4eef5263593d721c"},"previous_names":[],"tags_count":3,"template":true,"template_full_name":null,"purl":"pkg:github/blacktrs/modern-wp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacktrs%2Fmodern-wp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacktrs%2Fmodern-wp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacktrs%2Fmodern-wp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacktrs%2Fmodern-wp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blacktrs","download_url":"https://codeload.github.com/blacktrs/modern-wp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacktrs%2Fmodern-wp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","symfony","wordpress"],"created_at":"2024-11-13T00:15:20.529Z","updated_at":"2026-05-01T20:32:38.576Z","avatar_url":"https://github.com/blacktrs.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\nModernWP is an enhanced WordPress boilerplate based on the pure [Symfony Framework](https://github.com/symfony) and [Roots Bedrock](https://github.com/roots/bedrock).\n\nModernWP is created for WordPress-based projects that need better structure and tooling. You can use almost everything from Symfony and WordPress at the same time.\n\nThis boilerplate could be used for migrating big codebase from classic heavy WordPress-style projects to modern approaches without significant breaking loss of backward compatibility.\n\n## Features\n* Symfony-driven structure project\n* Easier configuration\n* All benefits from the modern framework-based solution\n* Roots Bedrock inside\n\n## Requirements\n * PHP \u003e= 8.1\n * MySQL/MariaDB (due WordPress dependency)\n\n## Installation\n* `composer create-project blacktrs/modern-wp ./project`\n* `cd ./project`\n* `composer install`\n* `yarn install`\n* Configure `DATABASE_URL` in `.env`\n* Configure other needed env variables or yaml configs \n\n### Docker\n\n* Copy `docker-compose.dist.yml` to `docker-compose.yml`\n* Edit `docker-compose.yml` if needed\n* Run `docker-compose up -d --build`\n\n\n### Potential docker issues\n\n* If causes HTTP Error `500` after `bin/console cache:clear` remove `var` directory and recreate it with `chmod 0777`\n\n## Local environment\n\n* Open `https://localhost`\n\n### Custom hostname\n\n* Change `NGINX_HOST` with yours in `docker-compose.yml`\n* Add entry `127.0.0.1 your_host.local` to `/etc/hosts`\n\n### Local HTTPS\n\n* Install [mkcert](https://github.com/FiloSottile/mkcert)\n* Run `mkcert -install`\n\nBy default, https works for `localhost`\n\nIf needed to generate specific SSL certificate for your custom hostname run following command\n```\nmkcert \\\n  -cert-file docker/cert/main.crt \\\n  -key-file docker/cert/main.key \\\n  your-host.local\n```\n* Change `your_host.local` with desired hostname\n* Update `docker-compose.yml`\n\n# Documentation\n\n## Configuration\n\nBy default, configuration should be considered in `confing/**.yaml` files.\n\nThe all configuration parameters in `SCREAMING_SNAKE_CASE` will be converted to php const, so WordPress can read it as configuration constant. \n\nFor example, following parameters will be converted to PHP constant `WP_DEBUG` with `true` value. \nMore examples could be found in `config/packages/app.yaml` \n\n```yaml\nparameters:\n  WP_DEBUG: true\n```\n\n## Controller types\nYou can use 2 types of controllers:\n* Rest API\n* Template pages\n\n## Rest API Controllers\n* Every Rest API Controller will be available by the address `https://your-site.com/api/controller/path`\n* `api` prefix can be changed in `/config/packages/app.yml` in parameter `app.apiPrefix`\n\nBasically any non-template controller will be interpreted as Rest API controller. Examples could be found in `src/Controller/Rest` directory\n\n## Template Controllers\n\n* Every template controller will refer to the WordPress page address. \n* To declare template controller, the `path` parameter of `Route()` attribute should contain specific template name\n\nFor example, if needed controller for any page with a post-type page then declaring the route will look:\n\n```php \n#[Route(path: 'page.php', name: 'some_page')]\npublic function page(): Response\n{\n    return new Response('my page');\n}\n```\n\nIt is possible to declare a route for any WordPress template\n\nMore examples could be found in `src/Controller/Frontent` directory\n\nMore documentation about controllers in [symfony documentation](https://symfony.com/doc/current/routing.html)\n\n## Templating \n\nBy default, templates should be in `twig` format and stored int `templates` directory. More details in [symfony documentation](https://symfony.com/doc/current/templates.html)\n\n## Hooks\n\nDeclarations of the new handlers for WordPress actions and filters are recommended to add in `Kernel::registerHooks()` method\n\nIt is also recommended to use as a handler for every hook separate invokable service classes. \nTo prevent Kernel class bloating it is better to store hook declarations as groups in the different classes.\n\n## Plugins\n\nPlugins can be added from the WordPress admin dashboard or as [Composer packages](https://wpackagist.org)\n\n## Working with database\n\nFor convenient work with the database it is better to use [Doctrine ORM](https://www.doctrine-project.org/projects/orm.html)\n\nOut-of-the-box in `src/Entity` are generated set of entities for default WP tables.\n\n## Boilerplate extending\n\nTo achieve deeper configuration please edit following files:\n* `config/bootstrap.php` - bootstrap configuration\n* `public/app/mu-plugins/register-application-config.php` - boilerplate WordPress loader\n* `public/app/themes/site-default/*`- default WP theme\n\n## Frontend assets\n\nIt is recommended to use `Symfony Encore` and `Symfony Asset` bundles to build and use frontend assets. \n\nCompiled assets better to store in `public` directory (e.g. `public/build`)\n\n# Links\n* [Symfony Framework](https://symfony.com/doc/current/index.html)\n* [Doctrine ORM](https://www.doctrine-project.org/projects/orm.html)\n* [Roots Bedrock](https://roots.io/bedrock)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacktrs%2Fmodern-wp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblacktrs%2Fmodern-wp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacktrs%2Fmodern-wp/lists"}