{"id":18929557,"url":"https://github.com/thecodingmachine/integration.wordpress.moufpress","last_synced_at":"2026-03-16T15:30:15.980Z","repository":{"id":15018110,"uuid":"17743774","full_name":"thecodingmachine/integration.wordpress.moufpress","owner":"thecodingmachine","description":"A MVC framework for Wordpress based on Mouf and compatible with Splash MVC","archived":false,"fork":false,"pushed_at":"2015-11-18T16:03:54.000Z","size":264,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":14,"default_branch":"3.0","last_synced_at":"2025-02-16T12:30:28.405Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecodingmachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-14T11:09:20.000Z","updated_at":"2015-02-05T16:27:58.000Z","dependencies_parsed_at":"2022-08-30T12:11:55.001Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/integration.wordpress.moufpress","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fintegration.wordpress.moufpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fintegration.wordpress.moufpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fintegration.wordpress.moufpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fintegration.wordpress.moufpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/integration.wordpress.moufpress/tar.gz/refs/heads/3.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239927825,"owners_count":19719835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-08T11:33:34.922Z","updated_at":"2026-03-16T15:30:15.896Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"MoufPress: a MVC framework for Wordpress based on Mouf\n======================================================\n\n![Logo](doc/images/moufpress.png)\n\nWhy should I care?\n------------------\n\nMoufpress is a **MVC framework for Wordpress**. Actually, it is a bridge between [Wordpress](http://wordpress.org/) and\nthe [Splash MVC framework](http://mouf-php.com/packages/mouf/mvc.splash/index.md) \nused by [Mouf-PHP](http://mouf-php.com) (a dependency injection based framework).\n\nMoufPress offers the following features:\n\n- **compatible controllers**, declared through a nice graphical DI container\n- **PSR-7 compatibility**: your controllers can take into parameter `Request` objects and respond `Response` objects\n  that are compatible with the [PSR-7 HTTP Message interfaces](http://www.php-fig.org/psr/psr-7/).\n- use of **annotations** in your controllers (for instance: `@URL` to declare a new route, `@Logged` to restrict access to logged users, etc...)\n- support for any kind of **views** supported in Splash MVC (this includes plain PHP files, [Twig templates](http://twig.sensiolabs.org/), etc...)\n- a [nice web-based UI to scafold your controllers and views](http://mouf-php.com/packages/mouf/mvc.splash/doc/writing_controllers.md)\n- integration of your views inside the Wordpress theme\n- (very) easy Ajax support\n- creating [**Wordpress widgets**](doc/widgets.md) through dependency injection in Mouf\n- integration of Mouf's [**authentication and authorization**](doc/authentication_and_right_management.md) system into Wordpress\n- integration of Mouf's [**web library (JS/CSS)**](doc/scripts-and-styles.md) system into Wordpress\n\nAnother interesting feature is that your code is **100% compatible** with Splash MVC. This means that:\n\n- You can write a controller in Splash MVC and deploy it later in Wordpress (or the opposite)\n- Since there is also a Drupal module for Splash ([Druplash](http://mouf-php.com/packages/mouf/integration.drupal.druplash/README.md)),\n  you can actually **write a controller in Wordpress and deploy it in Drupal** (or the other way around).\n  Yes, you read it correctly, you can develop an application that will run on both Wordpress and Drupal (!)\n  Haha! I see you're interested. Let's get started!\n\nInstallation\n------------\n\nYou will first need to install Wordpress and Mouf side by side.\n\n1. Start by installing [Wordpress](http://wordpress.org/) as you would normally do.\n2. Install the [WP-Router plugin](https://wordpress.org/plugins/wp-router/).  \n   Note: even if the plugin page stats this plugin works up to version 3.4 of Wordpress,\n   we have tested with Wordpress 3.8.1 and 4.3.1 and it works great.\n3. [Install the Mouf PHP framework](http://mouf-php.com/packages/mouf/mouf/doc/installing_mouf.md) _in the same directory_ as Wordpress\n   This means you should have the **composer.json** file of Composer in the same directory as the **wp-config.php** of Wordpress.\n4. Modify **composer.json** and add the **moufpress** module. Your **composer.json** should contain at least these lines: \n\n\t\t{\n\t\t\t\"autoload\" : {\n\t\t\t\t\"psr-4\" : {\n\t\t\t\t\t\"MyApp\\\\\" : \"src/MyApp\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"require\" : {\n\t\t\t\t\"mouf/mouf\" : \"~2.0\",\n\t\t\t\t\"mouf/integration.wordpress.moufpress\" : \"~3.0\"\n\t\t\t},\n\t\t\t\"minimum-stability\" : \"dev\",\n\t\t\t\"prefer-stable\": true\n\t\t}\n\n   Do not forget to customize your vendor name (the `MyApp` part of the autoloader section).\n5. Create the empty `src/` directory at the root of your project.\n6. Run the install process in Mouf: connect to Mouf UI and run the install process for all the packages \n   (including Moufpress install process of course)\n7. If it has not been done already, activate the **WP Router** module, as well as URL rewriting in settings \u003e\u003e permalinks menu (the only option that CANNOT be set is the default one : `http://localhost/wordtest/?p=123`).\n8. When you downloaded Moufpress, Composer automatically copied a Moufpress plugin in the `wp-content/plugins` directory of\n   Wordpress. You need to install this plugin. Connect to your Wordpress admin,  select the **Plugins \u003e Installed plugins** \n   menu, and click on the \"Activate\" button for the \"Moufpress\" plugin.\n\n\nGetting started\n---------------\n\n[In the next section, we will learn **how to create a controller and a view**.](doc/mvc.md)\n\nOr if you already know Splash, you can directly jump to another part of this documentation:\n\n- [widgets integration](doc/widgets.md)\n- [authentication and authorization](doc/authentication_and_right_management.md)\n- [web library (JS/CSS)](doc/scripts-and-styles.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fintegration.wordpress.moufpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Fintegration.wordpress.moufpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fintegration.wordpress.moufpress/lists"}