Pollora is an innovative bridge between Laravel and WordPress, offering an expressive and elegant syntax. It provides a structure and foundation for integrating WordPress into Laravel, allowing you to focus on crafting something astonishing while we handle the intricacies.
With Pollora, you get the best of both worlds - Laravel's development ease and WordPress's content management prowess. Whether you're a novice in web development or a seasoned expert, Pollora is designed to adapt and evolve with your needs. We're excited to witness the masterpieces you'll craft.
When it comes to integrating WordPress into a modern web application framework like Laravel, there are options. But we firmly believe Pollora stands out as the optimal choice for a seamless, powerful, and efficient integration.
Ensure your local machine has PHP and Composer set up before initiating your first Pollora project (Please refer to the Laravel Documentation about Docker).
For macOS developers, quickly set up PHP and Composer with Laravel Herd. We also suggest installing Node and NPM.
Once you're set, create a new Pollora project using the Composer create-project command:
composer create-project pollora/pollora example-appOnce your project is set up, utilize the Pollora Artisan CLI serve command to kickstart Pollora's local development server:
cd example-app
php artisan serveAll configuration files for Pollora are located in the config directory. Feel free to familiarize yourself with the options as each one is well-documented.
Out of the box, Pollora requires minimal configuration. However, it might be worthwhile to review the config/app.php file and its accompanying documentation to tailor settings like timezone and locale to your needs.
Configuration values in Pollora can vary depending on the environment (local vs. production). These values are usually defined in the .env file at your application's root.
For security reasons, never commit your .env file to source control. Different developers or servers might need different configurations, and exposing sensitive credentials would pose a significant risk.
Note
For a deep dive into the.envfile and environment configurations, peruse the full configuration documentation.
With your Pollora application ready, you might want to store data. By default, the application's .env configuration indicates that Pollora will interact with a MySQL database. If you're on macOS, installing MySQL, Postgres, or Redis is a breeze with DBngin.
If you'd rather not use MySQL or Postgres, SQLite is a lightweight alternative. To begin, create a SQLite database in the database directory:
touch database/database.sqliteThen, adjust your .env file to utilize Pollora's sqlite database driver. Unneeded configurations can be removed.
Finally, run your application's database migrations to establish your database tables:
php artisan migrateAlways serve Pollora from the root of the "web directory" set for your server. Avoid serving Pollora from a subdirectory as it could inadvertently expose sensitive files.
With your Pollora project set up, here are the recommended next steps:
- Getting Started with Pollora — Build your first application
- Routing — Learn WordPress routing with
Route::wp() - Theming — Create your first theme with Blade templates
- Post Types — Register custom post types with PHP attributes
For Laravel-specific concepts, see the Laravel documentation.