Running JekCMS on Shared Hosting: A Realistic Performance Guide

Shared hosting works well for JekCMS sites with under 5,000 daily visits — if configured correctly. The defaults are designed for VPS environments and will cause timeouts on most shared plans. This guide covers the specific php.ini values, .htaccess rules, and database settings that separate a sluggish site from a fast one.

Running JekCMS on Shared Hosting: A Realistic Performance Guide

Shared hosting works well for JekCMS sites with under 5,000 daily visits — if configured correctly. The defaults are designed for VPS environments and will cause timeouts on most shared plans. This guide covers the specific php.ini values, .htaccess rules, and database settings that separate a sluggish site from a fast one.

The most impactful php.ini change is max_execution_time. JekCMS's image processing pipeline can take 3–8 seconds per upload for large files, and the default on many shared plans is 30 seconds — enough for a single image, not enough for batch uploads. Set it to 90 seconds. The second critical value is memory_limit: 256MB is the practical minimum; 512MB is safer for sites with active media operations.

OPcache: The Silent Performance Killer

opcache.memory_consumption should be at least 128MB. Many shared hosting control panels configure this to 64MB, which causes frequent cache invalidation and is often the root cause of intermittently slow page loads that are difficult to reproduce. You can check current usage by creating a temporary PHP file that calls var_dump(opcache_get_status()).

Page Cache: Your Best Lever on Shared Hosting

JekCMS doesn't run a separate application-level query cache — there's one cache layer, controlled by three settings in config/config.php: CACHE_ENABLED, PAGE_CACHE_ENABLED, and PAGE_CACHE_LIFETIME (300 seconds by default). When page cache is on, a visitor's first request for a URL renders the full HTML and writes it to disk; every request after that, until the TTL expires, is served straight from that file without touching PHP or the database at all. On shared hosting, where every PHP execution and every MySQL connection competes for the same throttled resources, this is the single biggest lever you have — it turns a page that costs 8-15 queries into one that costs zero.

If your host still runs an older MySQL 5.7 or MariaDB build with its own built-in query cache enabled, you don't need to fight it. JekCMS has no separate query-result cache to conflict with — MySQL's own query cache (removed entirely in MySQL 8.0) can stay at whatever the host defaults to.

Verifying GZIP and Browser Cache

Verify GZIP compression and browser caching are active with: curl -H "Accept-Encoding: gzip" -I https://yoursite.com/. The response should include Content-Encoding: gzip. If it does not, your host may require activating mod_deflate from the control panel. Without GZIP, HTML responses are typically 3-5x larger than they need to be.

Essential php.ini Settings Reference

Most shared hosts allow overriding php.ini values via a local .user.ini file in the site root. Here is the recommended configuration:

; .user.ini (place in site root)
max_execution_time = 90
memory_limit = 256M
upload_max_filesize = 32M
post_max_size = 48M
max_input_vars = 5000
opcache.memory_consumption = 128
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 10000
opcache.revalidate_freq = 60

Why These Specific Values

  • upload_max_filesize = 32M — accommodates high-resolution photographs before AVIF conversion; converted output is typically 80-90% smaller
  • post_max_size = 48M — should exceed upload_max_filesize to leave headroom for the rest of the form payload alongside the file
  • max_input_vars = 5000 — the admin bulk editor and metadata/category/SEO forms can submit dozens of fields per post; a low default here silently truncates the submission
  • opcache.revalidate_freq = 60 — checks for file changes once per minute instead of on every request, which matters once you're deploying updates to more than a handful of files

.htaccess Performance Rules

The .htaccess file is where most shared hosting performance gains come from. JekCMS ships with a default that includes GZIP and cache headers, but many hosts strip these during deployment.

<IfModule mod_expires.c>
 ExpiresActive On
 ExpiresByType image/avif "access plus 1 year"
 ExpiresByType image/webp "access plus 1 year"
 ExpiresByType text/css "access plus 1 year"
 ExpiresByType application/javascript "access plus 1 year"
 ExpiresByType font/woff2 "access plus 1 year"
</IfModule>

Database Connection and Query Monitoring

JekCMS opens a single PDO connection per request and reuses it for all queries. On a typical page load this means 8-15 queries through one connection rather than separate handshakes. If your host exposes a MySQL slow query log, turn it on temporarily after a deployment and check it for anything over 50ms — that almost always points to a missing index. The most common offender is post_meta lookups: the default schema indexes post_id and meta_key separately rather than as a single compound index, and combining them — ALTER TABLE post_meta ADD INDEX (post_id, meta_key) — is usually the cheapest win available on a struggling shared-hosting install.

Scheduled Posts and Cron on Shared Hosting

Most shared hosts either don't offer cron access at all or bury it several menus deep in the control panel. You don't need to find it. JekCMS's scheduler — covered in detail here — falls back automatically to a visitor-triggered check when it doesn't detect a real cron running: the check is throttled to once every 60 seconds and runs only after the response has already been sent to the visitor, so it adds no perceptible delay to any request. If your plan does include cron, pointing it at cron.php once a minute gets you the tightest possible scheduling accuracy and switches the visitor-triggered fallback off automatically.

File Upload Limits and Media Processing

Three php.ini directives control file uploads: upload_max_filesize, post_max_size, and max_file_uploads. Set upload_max_filesize to at least 20M for comfortable image uploading. The post_max_size must be larger than upload_max_filesize — we recommend 25M. The overlooked max_file_uploads defaults to 20 on most hosts, which limits batch media imports. For sites doing bulk imports or webhook-driven publishing, increase this to 50.

Error Logging on Shared Hosting

Most shared hosts disable display_errors in production, which is correct. However, you still need error logging. Add these to your .user.ini:

log_errors = On
error_log = /home/username/logs/php_error.log
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

Check this log file after every deployment. Common issues on shared hosting include undefined constant warnings from missing .env files and permission errors on the cache/ directory. The log file grows unbounded on most hosts, so add a cron job to rotate it monthly or truncate entries older than 30 days.

SSL and HTTPS Enforcement

Every shared hosting plan now includes free SSL via Let's Encrypt or AutoSSL. JekCMS requires HTTPS in production.

Add the redirect rule early in your .htaccess — before any rewrite rules — to avoid redirect chains that waste the visitor's first request. A common mistake is placing the SSL redirect after the trailing slash rule, which causes two sequential redirects instead of one. The correct order is: SSL redirect first, then www/non-www normalization, then trailing slash rules, then application routing.

Order Today

One-time payment, lifetime access. Setup in 30 minutes.

View Pricing
  • Setup and live in 30 minutes
  • 14+ professional themes
  • n8n automation integration
  • Automatic SEO — Sitemap, Schema.org
  • iyzico payment support

Be the first to know

New features, release notes & CMS guides — a couple of emails a month, no spam.