A simple blog built in PHP
This is a basic blog built in PHP, without any frameworks but instead multiple composer package linked together.
Follow these steps if you plan to install this project either locally or for production.
Make sure you have at least PHP 7.2 installed, a MySQL server, and composer.
In the root of the project, type
composer install to install all the dependencies.
Then, make a copy of
.env.example into a
.env file, and change the env parameters as you need (including the DB ones).
On dev environment, you can start a simple PHP server by running the following from the root of the project:
php -S localhost:8000 -t frontend/public/
You can of course use any other HTTP server of your choice. Just note that the root folder is frontend/public, with the index.php file as an entry point.
To generate the SQL queries you need for tables creation, simply type :
vendor/bin/doctrine orm:schema-tool:update --dump-sql
And either copy / paste the SQL into your MySQL client, or add the --force option to directly run it.
Once the project is installed, head over to the /admin URL in your browser to access the admin interface. (That would be http://localhost:8000/admin on dev)
It will ask you for the admin credentials you set in
On the admin index, you'll need to update the Blog Configuration. There, you can set the name of your blog, a short description of it for the home page, and some text about you and your blog that will display on the about page.
You'll also need at least one author created through admin.
Once this is all done, you should be ready to write blog posts!