a. Minimum requirement
- PHP7 with openssl extension enabled
- SQL DBMS
b. Versions used in this project :
- Apache 2.4.51
- MySQL 8.0.27
- PHP 7.4.26
- Used for contact form
- twig/twig : 3.3
- phpmailer/phpmailer : 6.5
- devcoder-xyz/php-dotenv : 1.1
- squizlabs/php_codesniffer : 3.6
- Bootstrap 5.1.3 (load in templates/layout.twig)
- Font-awesome 6 (load in templates/layout.twig)
1. Download zip files or clone the project repository with github - GitHub documentation
- In your DBMS create a new database named blog
- Import blog.sql file in your DBMS (file available here : sql/blog.sql)
- Go to app/utils folder and complete the .env file with your SMTP informations
- Exceptionally for this project, the .env file is filled but normally an empty file like the code below is provided to avoid sharing sensitive data
HOST =
USERNAME =
PASSWORD =
RECIPIENT =
RECIPIENT_NAME =
SUBJECT =
Go to database folder and add your DBMS informations on line 20, 25 and 30
private const DSN = 'mysql:dbname=blog;host=localhost'
private const USERNAME = 'root'
private const PASSWORD = ''
Use the command below to install all the packages needed to run the blog
$ composer install
- Go to app/public/index.php at line 13 to 20 to see the code below
// Used in homepage.twig
define('CREATOR_NAME', 'Your Name');
define('QUOTE', 'Your favorite quote');
define('QUOTE_AUTHOR', 'Author of your favorite quote');
// Used in layout.twig
define('GITHUB_LINK', 'https://github.com/your_name');
define('LINKEDIN_LINK', 'https://www.linkedin.com/in/your_name');
define('TWITTER_LINK', 'https://twitter.com/your_name');
- Define CREATOR_NAME value to display your name
- Define the QUOTE and the QUOTE_AUTHOR value to display your favorite quote
- Define GITHUB_LINK to display your GitHub link into the footer
- Define LINKEDIN_LINK to display your Linkedin link into the footer
- Define TWITTER_LINK to display your Twitter link into the footer
- Choose your avatar image, rename it to creator-avatar.png and place it to app/public/avatars folder
- Choose your CV, rename it to cv.pdf and place it app/public/cv folder
- Launch the server
- Create an account on the signup page
- Go to your DBMS
- Set is_validate to 1
- Set is_admin to 1