Hi,
I have static website with 10 pages and I need to include articles on one of them. I need script that is easy to install on my PHP/MySQL server and to publish news through administration page. Also to customizable for front-end.
10x

Dani AI

Generated

A clear, low-overhead plan works best for a small static site like the one describes. The thread already points toward lightweight solutions (see comments from and ); the following outlines practical choices, a minimal schema, and the security/troubleshooting checklist needed to get a simple news system running reliably on typical PHP/MySQL hosting.

Two implementation patterns

  • Dynamic include: convert the page that will show articles to PHP and include a tiny listing script that queries the database for published items. Immediate updates and simple pagination are the main benefits.
  • Static-generation: have the admin tool write an HTML fragment or full page to disk at publish time so the public site remains static. This avoids runtime DB hits and is useful on very limited hosts, but requires safe file-write handling.

Minimal table (example)

CREATE TABLE news (
  id INT AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  slug VARCHAR(255) UNIQUE NOT NULL,
  excerpt TEXT,
  body MEDIUMTEXT NOT NULL,
  author VARCHAR(100),
  created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
  published_at DATETIME NULL,
  status ENUM('draft','published') DEFAULT 'draft'
);

Admin/security checklist

  • Authentication: store hashes via password_hash() and verify with password_verify(). Protect admin pages with HTTPS and session cookies using Secure and HttpOnly flags.
  • DB access: use PDO with prepared statements; give the DB user minimum privileges (SELECT/INSERT/UPDATE/DELETE only on the news table).
  • Output: always escape output for HTML to prevent XSS. If WYSIWYG content is allowed, sanitize saved HTML with a trusted sanitizer.
  • Uploads: validate file types, store uploads outside the webroot or in a protected folder, and avoid allowing arbitrary filenames.
  • Backups: schedule simple SQL or file backups. For production safety, include an uninstall/upgrade path and a password-reset method in the admin.

Practical tips and budget note

  • For integration on a static site the simplest route is a single include (or writing a fragment on publish). Add simple caching for the dynamic route to reduce DB load. Pagination, an RSS feed, and a "status" field for scheduled publishing are easy incremental features. ’s budget question is relevant: plenty of free, maintained micro-scripts exist, while paid options remove branding and add polish; the most important selection criteria are recent maintenance, minimal dependencies, and clear install/backup instructions.

Recommended Answers

All 3 Replies

Budget?

Hi,
I have static website with 10 pages and I need to include articles on one of them. I need script that is easy to install on my PHP/MySQL server and to publish news through administration page. Also to customizable for front-end.
10x

I have been very happy with CuteNews: original is available at: http://cutephp.com/
Paying a small license fee removes their "powered by" credit. You can install as a flat file or MySQL database. Flat is ok until you get 2000+ listings.

A free "lookalike" is at: www.cutenewsru.com but I have never used it.

I second CuteNews. Used it for many sites and never been disappointed... also doesn't require MySQL if you have budget hosting.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.