Skip to content

All-Access from $9.75/mo, billed yearly. Every template, every format, commercial use.

Slide Sigma All-Access
Get All-Access

Website Templates

Cannanews — Cannabis News Site PHP Website Template

by MetropolitanHost · updated Apr 28, 2026

Included in All-Access PHP

Download this template, and every other one, with All-Access.

  • Monthlybilled $27 every month$27/mo
  • Yearlybilled $117 every year$9.75/mo
  • Lifetimeone payment$349
Subscribe to Download

Unlimited downloads · commercial use · Sign in

Need only this one? Buy it alone for $19 on MetropolitanHost

Framework
PHP 8.x
Libraries
Swiper, WOW.js
Browsers
Chrome, Firefox, Safari, Edge
Responsive
Yes - Mobile First
Documentation
Included
Updates
Free lifetime updates
W3C valid
Yes
Version
11.2.0

About This Item

Cannanews PHP is a modern, bold Cannabis News Magazine web template built on PHP 8.1 with a clean MVC architecture, Bootstrap 5, and MySQL database integration. It ships with 13 server-rendered pages, a blog module, all powered by PHP with PDO database abstraction and Composer autoloading — fully ready for shared hosting deployment.

Built for PHP developers delivering cannabis news sites where server-side rendering, dynamic article management, and database-backed category feeds are required. The MVC structure separates routing, controllers, models, and view templates cleanly. PDO prepared statements protect every database query against SQL injection, and all user input is sanitised before output. The breaking-news ticker, category archives, and featured-story video popup are all driven from the database. No Node.js, no build step — deploy directly to any cPanel or Plesk host.

Everything in the Package

  • 13 server-rendered PHP pages with MVC routing
  • PHP 8.1 — named arguments, match expressions, and readonly properties
  • MySQL database integration via PDO with prepared statements throughout
  • Composer autoloading — PSR-4 class autoloading, no manual require chains
  • Bootstrap 5 — responsive grid, mobile-first layout
  • Newsroom contact form with server-side validation, CSRF token protection, and PHPMailer SMTP integration
  • Environment configuration via .env — DB credentials, SMTP settings, and app URL
  • Full SQL schema dump included — articles, categories and breaking-news tables ready to import and run
  • Swiper carousels and WOW.js scroll animations on all pages
  • Retina-ready, fully responsive from 320px to 1920px+
  • Well documented — setup guide covering database import, .env configuration, and SMTP setup

MVC Architecture and File Structure

  • Router: app/Router.php — maps URL paths to controller methods via regex route matching
  • Controllers handle request logic and pass typed article and category data arrays to view templates
  • Models wrap PDO queries with typed return objects — swap MySQL for PostgreSQL by changing the DSN
  • Views: templates/ directory with reusable partials — header.php, footer.php, navbar.php, ticker.php
  • All user input sanitised with htmlspecialchars() before output and PDO bindings before DB queries
  • CSRF tokens generated with bin2hex(random_bytes(32)) on form render, validated on POST
  • Folder structure: app/Controllers/, app/Models/, app/Router.php, templates/, public/, config/, database/

All 13 Pages

  • home-v1.php — Editorial hero with featured stories and category news feeds
  • home-v2.php — Alternate magazine-style home layout
  • home-v3.php — Third home variant with distinct article arrangement
  • category.php — News category archive, layout one
  • category-2.php — Category archive, layout two
  • category-3.php — Category archive, layout three
  • category-4.php — Category archive, layout four
  • category-5.php — Category archive, layout five
  • blog-details.php — Full article view, layout one
  • blog-details-2.php — Full article view, layout two
  • contact.php — Editorial newsroom contact form and submission info
  • 404.php — Custom branded error page

Key Features

  • 13 Fully Designed HTML5 Pages across home, news categories, articles, and contact
  • 3 Unique Home Layouts — distinct editorial hero styles and article arrangement variants
  • Bootstrap 5 — responsive, mobile-first grid system
  • 5 Category Archive Layouts — five distinct news category page styles for Politics, World, Sport, Business and Lifestyle
  • Blog Article Detail Pages — two full article page layout variants with social share
  • Breaking news ticker and featured-story video popup
  • 404 Page — custom branded error page
  • Contact Page — editorial newsroom contact form and submission info
  • Well Documented — step-by-step documentation for easy setup & customisation
  • Cross-Browser Compatible — Chrome, Firefox, Safari, Edge, Opera

Security

  • PDO prepared statements on every database query — SQL injection not possible through the model layer
  • CSRF tokens on all POST forms — validated server-side before processing
  • htmlspecialchars() applied to all user-supplied output — XSS prevention throughout
  • DB credentials, SMTP passwords, and secrets stored in .env — never committed to version control
  • File upload validation — MIME type check, extension whitelist, and size limit enforced server-side

Use Cases

  • Cannabis News Sites: Server-rendered, database-backed cannabis news magazine with no build step required
  • PHP Developers: MVC architecture, PDO models, and Composer autoloading — extend without tech debt
  • Shared Hosting Deployments: Pure PHP 8.1 — runs on any cPanel or Plesk host without Node.js or Docker
  • Agencies: Dynamic article management via MySQL — update stories, categories, and breaking news from the database or admin panel

Credits and Dependencies

  • PHP 8.1 — PHP License
  • Bootstrap 5 — MIT License
  • Composer — MIT License
  • vlucas/phpdotenv — BSD-3 License
  • PHPMailer — LGPL 2.1 License
  • Font Awesome 6 — Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT
  • Google Fonts — SIL Open Font License
  • Demo images: Unsplash — Unsplash License (free for commercial use, no attribution required)
  • Demo images: Freepik — Freepik License (free for commercial use with attribution)
  • All demo images are for preview purposes only and are NOT included in the download.

Changelog

v1.0 2026-03-22

  • PHP 8.1 MVC architecture with Composer PSR-4 autoloading
  • MySQL database with full SQL schema dump included
  • PDO prepared statements on all queries u2014 SQL injection protected
  • CSRF token protection on all POST forms
  • Dynamic content management via MySQL database
  • PHPMailer SMTP contact form integration
  • .env configuration for DB credentials, SMTP, and app URL

Sign in

Your All-Access plan and downloads in one place.

or use your email

New here? Create an account