This site previously introduced a WordPress MVC framework—Themosis Framework, which is built on some Laravel components. For sites that only need to add a few MVC features, it might be a bit heavy. Today, I’ll introduce a similar MVC framework, “WP Emerge”.
Similar to Themosis Framework, WP Emerge is also a WordPress MVC framework inspired by Laravel. Relatively speaking, WP Emerge does not use any Laravel components; it’s a lightweight WordPress MVC framework.
WP Emerge Features
- Complete routing system: including controllers, middleware, PSR-7 responses, and view engines.
- Can use any template engine: supports native PHP, Laravel Blade, Twig, or any other template engine.
- Service Container: All dependencies are instantiated using an IoC container and can be replaced with custom, compatible containers at will.
- Extensible: Service providers, template engines, dynamic route conditions, error handling—all can be customized and extended.
- Advanced error reporting: Beautiful and interactive stack traces with data dumps and source file highlighting.
- Full support for WordPress Loop: WP Emerge does not modify or overwrite the WordPress post loop but supplements it.
- Routing middleware support: Middleware can be added globally or to specific routes or route groups. Supports features like Flash and OldInput.
WP Emerge Resources
Here are some documentation and learning resources provided by the official WP Emerge site, which can help us quickly get started with the WP Emerge framework.
- Documentation: https://docs.wpemerge.com/#/framework/overview. We can refer to the documentation to integrate WP Emerge into our existing themes.
- Starter Theme Code: https://github.com/htmlburger/wpemerge-theme. Friends who want to experience WP Emerge can directly clone this repository, install it in WordPress, and try modifying the starter theme code to see the effect.
- Starter Theme Documentation: https://docs.wpemerge.com/#/starter-theme/overview. We can follow this documentation to modify the starter theme code and develop features based on the starter theme.
- API Reference: https://api.wpemerge.com/master/. If you encounter problems while using WP Emerge, you can search the API reference for solutions.
WP Emerge FAQ
No, WP Emerge is a framework that can be included in a theme. While there is no official support, including it in a plugin should not be very difficult.
No, although greatly inspired by Laravel, WP Emerge is very streamlined, adjusted for WordPress, and does not include any illuminate/* software packages.
Of course, one benefit of WP Emerge is its progressive integration. You can use it in old projects without having to rewrite site logic or templates. For example, you can use Blade to render new templates while still using regular PHP to render old templates.
Yes – WP Emerge is open-source and free, licensed under GPL 2.0. You’re free to submit issues, suggestions, and pull requests on GitHub.
WP Emerge is suitable for any theme. It’s recommended to refer to the official WP Emerge starter theme to integrate WP Emerge into your theme.
Check the official documentation, ask questions in the Gitter Lobby, or submit issues, feature requests, and pull requests on GitHub.
After a trial, we found that WP Emerge can completely implement a full MVC process and integrates very well with WordPress. Friends who need to use WordPress for application development can give it a try.
