Build enterprise solutions with WordPress.
When the Wordpress bundle is loaded, it includes the minimal amount of Wordpress Core files to allow usage of Wordpress functions and plugins inside Symfony.
Example :
// src/Controller/BlogController.php
/**
* @param Post $post
* @param PostRepository $postRepository
* @param BreadcrumbService $breadcrumbService
* @return Response
*/
public function pageAction(Post $post, PostRepository $postRepository)
{
$context = [];
// get current post
$context['post'] = $post;
// find 10 "brands" ordered by title
$context['brands'] = $postRepository->findBy(['post_type'=>'brand'], ['title'=>'ASC'], 10);
return $this->render('page.html.twig', $context);
}{# templates/page.html.twig #}
{% extends 'layout.html.twig' %}
{% block body %}
<article id="post-{{ post.ID }}" class="{{ post.class }}">
{% if post.thumbnail %}
<img src="{{ post.thumbnail|resize(800, 600) }}" alt="{{ post.thumbnail.alt }}"/>
{% endif %}
<div class="entry-content">
{{ post.content|raw }}
</div>
<small>{{ post.metafields.mention }}</small>
{% for brand in brands %}
{% include 'brand.html.twig' %}
{% endfor %}
</article>
{% endblock body %}Full documentation is available on Gitbook
Using Composer :
- Install/update Wordpress via composer
- Install/update plugins via composer
Using Symfony :
- Template engine
- Folder structure
- Http Cache
- Routing
- YML configuration
- DotEnv
- Enhanced Security ( Wordpress is 'hidden' )
- Dynamic image resize
- MVC
Using Wordpress Bundle :
- Post/Term Repository
- Controller argument resolver for post(s), term and user
- Symfony Cache invalidation on update ( Varnish compatible )
- Post/Image/Menu/Term/User/Comment/Blog entity
- Wordpress predefined routes
- Site health checker url
- Static site export command
Using WP Steroids Wordpress plugin :
- Wordpress YML configuration ( view sample )
- Permalink configuration for custom post type and taxonomy
- Maintenance mode
- Backup download in dev mode
- Build hook
- Disabled automatic update
- Enhanced Security
- Better guid using RFC 4122 compliant UUID version 5
- Multisite images sync ( for multisite as multilangue )
- SVG Support
- Better Performance
- Wordpress Bugfix
- CSS Fix
- Relative urls
- Multisite post deep copy ( with multisite-language-switcher plugin )
- Custom datatable support with view and delete actions in admin
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
$ composer create-project metabolism/wordpress-skeleton my_project_directoryPlease read the full bundle installation guide to continue
Define installation path for Wordpress core and plugins in composer.json
"minimum-stability": "dev",
...
"extra": {
"installer-paths": {
"public/wp-bundle/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
"public/wp-bundle/plugins/{$name}/": ["type:wordpress-plugin"],
"public/edition/": ["type:wordpress-core"]
}
}$ composer require metabolism/wordpress-bundle 2.0.xRegister the bundle
// config/bundles.php
return [
// ...
Metabolism\WordpressBundle\WordpressBundle::class => ['all' => true],
];Please read the full bundle installation guide to continue
https://github.com/wearemetabolism/wordpress-bundle-demo
This is an implementation of the Twenty Nineteen Wordpress theme for wordpress-bundle.
- Advanced custom fields Customise WordPress with powerful, professional and intuitive fields.
- ACF extensions Extensions for ACF
- Classic editor Restores the previous (« classic ») WordPress editor and the « Edit Post » screen.
- WP smartcrop Set the 'focal point' of any image, right from the media library
- Multisite language switcher Add multilingual support using a WordPress multisite
- Wordpress seo The favorite WordPress SEO plugin of millions of users worldwide!
- Query monitor Query Monitor is the developer tools panel for WordPress
- Redirection Easily manage 301 redirections, keep track of 404 errors
- Contact form 7 Manage multiple contact forms, plus you can customize the form and the mail contents
- More samples
- Global maintenance mode for multi-site
- Unit tests
Wordpress functions are available in the global namespace.
Some plugins may not work ( ex : Woocommerce ).
GPL 3.0 or later
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
This project is made by Metabolism ( http://metabolism.fr )
Current maintainers:
- Jérôme Barbato - [email protected]
