Simple blog system for personal development using procedural PHP and MySQLi. It allows you to create, edit, delete posts to get you started on your journey. If you are building your own from scratch this will give the head start that you need.
For educational purposes only.
Security is not guaranteed with this system, best efforts have been made to make it secure
database.sql
file into the new database you createdconfig.php
file
SITE_ROOT
if you are putting it in a folder/sub-directory (e.g. www.example.com/myblog/, you would enter 'myblog' there)PAGINATION
optionDEBUG_MODE
option to true
if you want/need to see any and all errorsThe system now uses slugs, also known as SEO URLs
The blog posts URL structure is like this: http://www.example.com/myblog/p/4/apple-reveals-apple-watch-series-7
, where the p/4/apple-reveals-apple-watch-series-7
is the slug
There is an .htaccess file that has the required rewrite module and rule in the files.
If you use NGINX, you can insert something similar to the code below in your NGINX configuration block.
location / {
rewrite ^p/(.*) view.php?id=$1;
}
The system is quite easy to use, as there isnt much work required to do a simple blog.
Username: admin
Password: 12345
There is no way to update the admin password through the dashboard yet.
__To change your password, hash your password with PHP's password_hash()
function. Then update the database value with the new password hash.__