1. About This CMS
INKRAH News Portal CMS is a news management system built from scratch using PHP and SQLite — without MySQL, without Node.js, and without external frameworks. Your entire database is just a single file (inkrah.sqlite), making backups and site migration extremely simple: just copy the file.
2. Feature List
All the features below are active and ready to use immediately after installation.
Article Management
Draft → editor review → schedule → publish. WordPress-style editor with buttons for bold, italic, headings, blockquotes, images, and links.
Categories & Tags
Create your own categories; articles automatically appear in navigation menus and category pages.
Media Manager
Upload images (JPEG/PNG/WebP/GIF), automatically validated and stored securely.
User & Role Management
11 built-in roles (Super Admin, Admin, Editor, Author, etc.) with customisable access permissions.
Classified Ads System
Place image ads or Google AdSense, track clicks & impressions, and provide password-protected statistics access for ad owners.
Built-in SEO
Automatic sitemap, RSS feed, structured data (JSON-LD), canonical URLs, and Open Graph previews for social media.
Fast Search
Full-text search powered by SQLite FTS5 — delivers relevant results even across thousands of articles.
REST API
Can be consumed by mobile apps or external sites via /api/v1/ using a dedicated token.
Responsive Design
Light/dark mode, smooth animations, displaying neatly on both mobile and desktop.
Built-in Database Browser
Exclusively for Super Admins — view and edit data directly from admin, with no third-party tools required.
Site Settings
Change site name, tagline, time zone, and URL directly from the admin panel.
Audit Log
Every important action (logins, data modifications, deletions) is recorded automatically.
3. Installation Guide
This guide assumes you are using standard cPanel hosting. You only need File Manager — no SSH or command line required.
3.1 Upload and Extract Files
Log in to cPanel → File Manager
Open public_html (this is your site's main folder). If you want this CMS to be the main website on your domain, upload files directly here. If you want this CMS located at an address like yourdomain.com/news, create a new folder named news first, then enter that folder.
Upload the CMS ZIP file
Click the Upload button in File Manager, select this project's ZIP file, and wait for the upload to complete.
Extract the ZIP file
Right-click the uploaded ZIP file → select Extract. Ensure the extracted files place index.php directly inside that folder (not hidden inside another subfolder). If an extra wrapper folder exists (e.g. inkrah-cms/index.php), move all contents one level up and delete the empty wrapper folder.
3.2 Set Folder Permissions
Right-click the database folder
Select Permissions (or Change Permissions). Set it to 755. If a "cannot write" error appears later, try changing it to 775.
Repeat for the storage folder
Same as above: right-click → Permissions → 755 (or 775 if required). Uploaded images are stored in this folder.
3.3 Run the Installer
Ensure the PHP version is correct
In cPanel, locate MultiPHP Manager or Select PHP Version. Select your domain/folder and set the PHP version to 8.1 or newer. This is mandatory — older versions will cause errors.
Open the installer via browser
Visit yourdomain.com/install/index.php (or yourdomain.com/news/install/index.php if installed in a subfolder). The page will display a system checklist — ensure all items show a green "OK".
Fill in the installation form
Enter the site name, Site URL (your full site address without a trailing slash — e.g. https://yourdomain.com/news), then create your primary administrator username, email, and password. Use a strong password (at least 12 characters, mixing uppercase/lowercase letters/numbers).
Click Install, then log in
Upon success, you will be redirected to the admin login page. Keep these credentials safe — this account is the primary Super Admin and is automatically protected from deletion.
3.4 If Installing in a Subfolder (Not Main Domain)
If you place this CMS at an address like yourdomain.com/news (rather than the main domain address), there is 1 small file you need to create manually before running the installer:
Open the core folder in File Manager
Click the + File button in the top corner of File Manager. Name the file: config.local.php. Ensure this file is created inside the core folder, alongside the existing config.php file.
Edit the file
Right-click the newly created config.local.php file → select Edit or Code Editor. Delete any contents (if any), then paste exactly this:
<?php
define('INKRAH_BASE_PATH', '/news');
define('INKRAH_APP_ENV', 'production');
Replace /news with your custom folder name if different. Save the file (click Save Changes).
Edit the .htaccess file in the main folder
Right-click .htaccess (if not visible, enable "Show Hidden Files" in File Manager settings) → Edit. Find the line # RewriteBase /news/, remove the hash symbol # in front, and adjust /news/ to match your folder name. Save.
https://yourdomain.com/news.
4. Securing the Website
This CMS comes with several built-in security features (password hashing, CSRF protection, etc.), but there are a few extra measures you must take yourself.
4.1 Mandatory Actions
| Action | Method |
|---|---|
| Enable HTTPS (SSL) | In cPanel, find SSL/TLS Status or Let's Encrypt, and activate it for your domain (usually free). |
| Strong Admin Password | Avoid common words. Use at least 12 characters, combining uppercase, lowercase, numbers, and symbols. |
| Delete migration files after use | Files like scripts/migrate-catchup.php are meant for single use only — delete them via File Manager once completed. |
| Do not share Super Admin accounts | This account has full access, including the Database Browser. Create separate accounts (lower roles) for other staff. |
4.2 Strongly Recommended
Rename the database folder
This makes your database file location much harder to guess. Steps:
- In File Manager, right-click the
databasefolder → Rename. Change it to a unique name, e.g.db-x7kQ9secret(letters and numbers only, avoid spaces). - Create/edit the
core/config.local.phpfile (see section 3.4 for creation instructions), and add this line at the very top, before any other lines:define('INKRAH_DB_DIR', 'db-x7kQ9secret'); - Save, then try opening your website — if it loads normally, the change was successful.
Routine Backups
Refer to section 5 (Maintenance) below for instructions.
Never edit files directly without a backup
Before editing any file via File Manager, download a copy to your local computer as a backup.
5. Routine Maintenance
5.1 Database Backup (Perform regularly, e.g. weekly)
Access File Manager
Open the database folder (or its new name if renamed according to section 4.2).
Download the inkrah.sqlite file
Right-click the file → Download. Save it to your computer with a clear name, e.g. backup-2026-08-20.sqlite.
Also back up the storage folder
This contains all uploaded images. Select the storage folder → right-click → Compress (to ZIP) → download the generated ZIP file.
.sqlite file into the database directory, overwriting the existing file. Perform this when website traffic is low.
5.2 If Search Results Seem Inaccurate
After manually editing or deleting many articles via the Database Browser, the search index may occasionally need refreshing. Go to the Database menu (Super Admin), select the articles_fts table, and in the "Raw SQL" section run:
DELETE FROM articles_fts;
Check the confirmation box, click Run. Then run the follow-up index rebuild query (found in scripts/migrate-catchup.php under the rebuild index section, or ask a developer if unsure).
5.3 Check Error Logs Periodically
If parts of the site behave unexpectedly, go to cPanel → Errors menu (or look for an error_log file in File Manager within your site folder). The bottom lines usually reveal the cause of the problem.
6. Further Development (Adding Features)
This section provides a general overview — adding new features still requires someone knowledgeable in PHP, or assistance from an AI/coding assistant.
| Folder | Contents |
|---|---|
core/ | Core system logic (database, authentication, etc.) — do not edit carelessly. |
admin/ | All admin panel pages. |
public/ | Front-end web presentation viewed by visitors, including CSS and images. |
api/ | Endpoints for external applications (mobile apps, external sites) to fetch data. |
database/ | Database file and table schema definitions. |
7. Daily Feature Usage Guide
7.1 Writing & Publishing Articles
Log in
Go to yourdomain.com/admin/login.php and sign in with your account.
Click menu Articles → + New article
You will enter the editor page.
Enter title and article content
Use formatting buttons above the text box for bold/italic/section headings/blockquotes/links/images. Images can be chosen from the Media Library using the "🖼 Image" button.
Select category & write an excerpt in the right sidebar
This sidebar can be hidden or toggled using the ☰ button in the top left corner if screen space is limited.
Select status
Select Published to publish immediately (only for roles with publish authorisation). Other roles automatically route to "pending review" status awaiting editor approval.
Click Save
Done — the article will appear on the homepage and its corresponding category page.
Adding Categories
Go to Categories in the admin sidebar → fill in the category name → click Add category. Categories automatically appear in the site navigation menu once they contain published articles.
7.2 Uploading Images (Media Library)
Go to Media in the admin sidebar → select an image file (JPEG/PNG/WebP/GIF, maximum 8MB) → fill in alternative text (alt text, for accessibility & SEO) → click Upload. Uploaded images can be reused repeatedly across any article via the "Choose from Media Library" button.
7.3 Adding Users & Managing Roles
Menu Users → fill in the "Create user" form
Enter name, username, email, password, then tick appropriate roles — for example "Author" for standard writers, or "Editor" for users authorised to review others' work.
Changing an existing user's role
Click Edit next to the user's name, tick/untick roles, and click Save.
7.4 Placing Classified Ads
Prepare advertisement image
Upload your ad image (e.g. ads1.png) to the public/assets/img/ folder via File Manager.
Menu Ads → create new ad
Fill in ad name, select type (Image or Google AdSense), enter image path (e.g. /public/assets/img/ads1.png) and target destination URL (must start with https://).
Select display placement
"Below article" = displayed beneath every article. "Before footer" = displayed as an advertisement banner row before the footer section.
(Optional) Set stats password
If this ad belongs to a client/partner, set "Owner stats password" — then share the link yourdomain.com/ad-stats.php?id=NUMBER with them so they can monitor ad performance independently without requiring admin login.
7.5 Managing Site Name, Tagline, and Time Zone
Go to Settings in the admin sidebar. Modify desired fields and click Save settings.
8. Common Troubleshooting
| Symptom | Possible Cause & Solution |
|---|---|
| Blank page / HTTP 500 error | Check PHP version (must be 8.1+) in cPanel. Check the error_log file in File Manager for exact error details. |
| Images not displaying | Check permissions on the storage folder (must be 755/775) and confirm files uploaded completely. |
| Category page or menu missing a category | New categories only appear in menus once they contain at least 1 published article. |
| Broken links after moving folder/domain | Open Settings menu and ensure "Site URL" matches your current domain/folder path. |
| Forgot Super Admin password | Requires intervention via Database Browser (if another admin account exists) or manual reset via the users table — consulting a developer is recommended. |
9. Other Important Notes
- Never delete the
core,database(or its renamed version), orstoragefolders — the website will fail to function without them. - Files named
scripts/migrate-*.phpare for single-use execution only and must be deleted immediately afterward, as anyone knowing the URL could access them. - This CMS is an open-source project — the attribution "INKRAH Web Design Open Source Project" in the website footer and source code should be preserved.
- Because it does not rely on external frameworks or CDNs, this site can run completely offline on localhost — useful for testing before deploying to a live server.
- Keep this document (and the development history of this CMS) as a reference in case you need assistance from other developers in the future.