All Projects → wearemetabolism → wordpress-bundle

wearemetabolism / wordpress-bundle

Licence: AGPL-3.0 license
Use Wordpress and Symfony together using a Symfony bundle

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to wordpress-bundle

socketio
No description or website provided.
Stars: ✭ 23 (-23.33%)
Mutual labels:  bundle, symfony-bundle
OpcacheBundle
Displays the PHP OPcache status in the Symfony profiler toolbar.
Stars: ✭ 21 (-30%)
Mutual labels:  bundle, symfony-bundle
stampie-bundle
stampie.github.io/
Stars: ✭ 26 (-13.33%)
Mutual labels:  bundle, symfony-bundle
awsBundle
Symfony AWS Bundle (supports Symfony 2, 3 and 4)
Stars: ✭ 18 (-40%)
Mutual labels:  bundle, symfony-bundle
connect-bundle
No description or website provided.
Stars: ✭ 35 (+16.67%)
Mutual labels:  bundle, symfony-bundle
SlackBundle
SlackBundle for Symfony2 with Guzzle-Integration
Stars: ✭ 39 (+30%)
Mutual labels:  bundle, symfony-bundle
LiipImagineSerializationBundle
Provides integration between LiipImagineBundle and JMSSerializerBundle
Stars: ✭ 24 (-20%)
Mutual labels:  bundle, symfony-bundle
SonataTimelineBundle
[Abandoned] Integrates SpyTimelineBundle into Sonata
Stars: ✭ 24 (-20%)
Mutual labels:  bundle, symfony-bundle
BeelabTagBundle
🏷 A simple implementation of tags for Symfony and Doctrine ORM
Stars: ✭ 45 (+50%)
Mutual labels:  bundle, symfony-bundle
hashed-asset-bundle
Apply an asset version based on a hash of the asset for symfony/asset
Stars: ✭ 24 (-20%)
Mutual labels:  bundle, symfony-bundle
enveigle
Deceive Ansible to template Trellis .env files to local Bedrock
Stars: ✭ 18 (-40%)
Mutual labels:  dotenv, wordpress-development
LiipSoapRecorderBundle
[DEPRECATED] Recorder/Player for SOAP communications
Stars: ✭ 12 (-60%)
Mutual labels:  bundle, symfony-bundle
LiipSearchBundle
[DEPRECATED] Google XML API for searching is discontinued
Stars: ✭ 35 (+16.67%)
Mutual labels:  bundle, symfony-bundle
SonataDashboardBundle
[Abandoned] Provides a Dashboard management through container and block services
Stars: ✭ 17 (-43.33%)
Mutual labels:  bundle, symfony-bundle
SensioBuzzBundle
No description or website provided.
Stars: ✭ 89 (+196.67%)
Mutual labels:  bundle, symfony-bundle
SonataDoctrineMongoDBAdminBundle
Symfony Sonata / Integrate Doctrine MongoDB ODM into the SonataAdminBundle
Stars: ✭ 64 (+113.33%)
Mutual labels:  bundle, symfony-bundle
Private Composer Installer
Composer install helper outsourcing sensitive keys from the package URL into environment variables
Stars: ✭ 168 (+460%)
Mutual labels:  dotenv, composer
gulp-rev-versions-bundle
A bundle that allows symfony to get the version of assets versioned with gulp-rev
Stars: ✭ 13 (-56.67%)
Mutual labels:  bundle, symfony-bundle
jsonrpc-bundle
JSON-RPC server for Symfony: exposes services registered in the service container as JSON-RPC-webservices
Stars: ✭ 31 (+3.33%)
Mutual labels:  bundle, symfony-bundle
NucleosDompdfBundle
📜 This bundle provides a wrapper for using dompdf inside symfony.
Stars: ✭ 29 (-3.33%)
Mutual labels:  bundle, symfony-bundle

Symfony WordPress Bundle

Build enterprise solutions with WordPress.

Latest Stable Version Total Downloads Latest Unstable Version License Buy us a tree Doc - Gitbook

How does it work ?

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="entry {{ post.class }}">

    {% if post.thumbnail %}
        <img src="{{ post.thumbnail|resize(800, 600) }}" alt="{{ post.thumbnail.alt }}"/>
    {% endif %}

    <div class="entry-content">
        
        {{ post.content|raw }}
        
        {# or #}
        
        {% for block in post.blocks %}
            {% include 'block/'~block.name~'.html.twig' %}
        {% endfor %}
    </div>
    
    <small>{{ post.custom_fields.mention }}</small>
    
    {% for brand in brands %}
        {% include 'brand.html.twig' %}
    {% endfor %}

</article>
{% endblock body %}

Documentation

Full documentation is available on Gitbook

Doc - Gitbook

Features

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/PostCollection/Image/Menu/Term/User/Comment/Blog/Block entity
  • WordPress predefined routes
  • Site health checker url
  • Static site export command

Using WP Steroids WordPress plugin :

  • WordPress configuration using yml ( 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 multi-langue )
  • 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

Installation

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

Creating a new project

$ composer create-project metabolism/wordpress-skeleton my_project_directory

Please read the full bundle installation guide to continue

Setting up an existing Symfony project

Define installation path for WordPress core and plugins in composer.json

"extra": {
    "installer-paths": {
        "public/wp-bundle/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
        "public/wp-bundle/plugins/{$name}/": ["type:wordpress-plugin"],
        "public/wp-bundle/themes/{$name}/": ["type:wordpress-theme"],
        "public/edition/": ["type:wordpress-core"]
    }
}

Install the bundle

$ composer require metabolism/wordpress-bundle

For applications that don't use Symfony Flex

Register the bundle

// config/bundles.php

return [
    // ...
    Metabolism\WordPressBundle\WordPressBundle::class => ['all' => true],
];

Please read the full bundle installation guide to continue

Demo

https://github.com/wearemetabolism/wordpress-bundle-demo

This is an implementation of the Twenty Nineteen WordPress theme for wordpress-bundle.

Screenshot from 2021-05-03 10-08-22

Recommended / tested plugins

  • 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

Roadmap

  • More samples
  • Global maintenance mode for multi-site
  • Unit tests

Drawbacks

WordPress's functions are available in the global namespace.

Some plugins may not work ( ex : Woocommerce ).

Licence

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.

Maintainers

Current maintainers:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].