WordPress Accelerator

Optimize your WordPress site with full-page caching.


Overview

The WordPress preset is optimized for WordPress blogs, news sites, and content-focused websites. It provides full-page caching while correctly handling the WordPress admin and logged-in user experience.


Quick Setup

  1. Create a new Accelerator with the WordPress preset
  2. Add your accelerator hostname to WordPress settings
  3. Point your domain DNS to the accelerator
  4. Verify caching is working

What Gets Cached

By default, these are cached:

  • Homepage
  • Blog posts and pages
  • Category and tag archives
  • Author archives
  • Search results (optional)

What Bypasses Cache

The WordPress preset automatically bypasses cache for:

Admin Areas

  • /wp-admin/*
  • /wp-login.php
  • wp-cron.php

Logged-In Users

Detected via cookies:

  • wordpress_logged_in_*
  • wp-postpass_*
  • wordpress_no_cache
  • comment_author_*

Dynamic Actions

  • POST requests
  • Requests with ?preview=true
  • Requests with ?p=123 (preview permalinks)

Configuration

Basic Settings

From your accelerator dashboard:

  1. Cache TTL - How long pages stay cached (default: 1 hour)
  2. Cache Authenticated - Whether to cache for logged-in users (not recommended)
  3. Custom Bypass Paths - Additional paths to bypass

Recommended WordPress Plugins

For best results, consider these plugins:

Cache Management:

  • LiteSpeed Cache (LSCache header support)
  • W3 Total Cache
  • WP Super Cache

{info} You don't need server-side caching plugins when using NordicCDN, but they can help with cache headers.

Object Caching:

  • Redis Object Cache
  • Memcached

Performance:

  • Autoptimize (CSS/JS optimization)
  • EWWW Image Optimizer

Purging Cache

From WordPress

Install our WordPress plugin for one-click purging:

  1. Download the NordicCDN plugin
  2. Install and activate
  3. Add your API key in Settings > NordicCDN
  4. Use the "Purge CDN Cache" button in the admin bar

Automatic Purging

The plugin automatically purges when:

  • A post is published or updated
  • A page is published or updated
  • Theme settings are changed
  • Menus are updated

Manual Purging

From your NordicCDN dashboard or via API:

curl -X POST "https://nordiccdn.com/api/v1/zones/{uuid}/purge" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{"type": "path", "paths": ["/my-updated-post/"]}'

Troubleshooting

Pages Not Caching

Check for:

  1. Cookies - Some plugins set cookies that trigger bypass
  2. Headers - Look for Cache-Control: private or no-cache
  3. Query strings - Some tracking parameters may affect caching

Admin Not Working

If you can't access wp-admin:

  1. Verify /wp-admin/* is in bypass paths
  2. Check that wordpress_logged_in_* cookie is being respected
  3. Clear browser cookies and try again

Seeing Cached Content When Logged In

If logged-in users see cached content:

  1. Verify the WordPress preset is selected
  2. Check that wordpress_logged_in_* cookie exists
  3. Ensure your domain is using the accelerator (not direct to origin)

Best Practices

1. Use a CDN for Assets

Point static assets to a separate Pull Zone:

// wp-config.php
define('WP_CONTENT_URL', 'https://cdn.yourdomain.com/wp-content');

2. Set Cache Headers

Add appropriate cache headers in WordPress:

// functions.php
function add_cache_headers() {
    if (!is_admin() && !is_user_logged_in()) {
        header('Cache-Control: public, max-age=3600');
    }
}
add_action('send_headers', 'add_cache_headers');

3. Exclude Dynamic Pages

Add dynamic pages to bypass list:

  • Search results
  • My Account pages (if using WooCommerce)
  • Any personalized content