Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting

Why Doesn't Preview Mode Work in WordPress? Causes and Fixes

Why Doesn't Preview Mode Work in WordPress? Causes and Fixes

Short answer

WordPress preview usually fails because a cache serves an old copy of the page, the WordPress Address and Site Address do not match, login cookies are not sent to the preview URL, the browser blocks the new tab, or a plugin or firewall breaks the autosave the preview depends on. Test in a private window, then check each cause below.

Key takeaways

  • Previews rely on an autosave, your login cookie and an uncached page.
  • Mismatched site URLs, such as www vs non-www, often break previews.
  • Caching plugins and CDNs must never cache preview URLs.
  • Pop-up blockers can stop Preview in new tab from opening.
  • REST API errors and plugin conflicts can stop the autosave behind the preview.

Why doesn't preview mode work in WordPress?

Preview breaks when one of its building blocks fails: the autosave, your login cookie, an uncached preview page, matching site URLs, or a browser that allows the new tab to open.

When you click Preview, WordPress first saves your changes as an autosave or draft. It then opens the post with a special preview link that only logged-in users with permission can see.

If any step fails, you may see a blank page, the old version, a 404 error, a login screen or nothing at all.

SymptomLikely causeFirst fix
Old content in previewPage or CDN cacheExclude previews from cache
Login screen or 404Cookie or URL mismatchMatch site URLs
Nothing opensPop-up blockerAllow pop-ups for your site
Preview spins foreverAutosave or REST API errorCheck Site Health and console
Broken layout only in previewPlugin or builder conflictTest with plugins disabled

How do you test the preview quickly?

Open a private browser window, log in, edit a post and click Preview; if it works there, a browser extension, cached file or stored cookie in your normal browser is the likely cause.

Try a second browser too. If both fail the same way, the problem is on the site or server.

In the block editor, the Preview button offers desktop, tablet and mobile views plus Preview in new tab. Check whether only the new tab option fails.

Open the browser console before clicking Preview. Chrome's DevTools Console guide shows how to read the errors it reports.

Are caching plugins or a CDN serving old previews?

If a page cache or CDN stores the preview URL, you see an old version or another user's view, so make sure logged-in users and URLs with preview parameters always bypass the cache.

Most caching plugins skip logged-in users by default. Check that this setting has not been turned off.

If you use Cloudflare cache rules to cache HTML, add a bypass for WordPress login cookies. The Cloudflare cache rules documentation explains how to set conditions.

Our guide on Cloudflare cache rules for WordPress includes safe bypass rules for admin and preview traffic.

After fixing the rules, clear every cache layer. Our guide on clearing cache in WordPress lists them.

Do your site URLs match?

The WordPress Address and Site Address in Settings > General must use the same protocol and domain version you log in on, or preview links point to a domain where you are not logged in.

A common example is logging in at a www address while the site is set to the non-www version. Your login cookie does not travel with the preview.

Mixed http and https settings cause the same problem. Use https for both addresses once SSL is installed.

The WordPress handbook page on editing wp-config.php explains the WP_HOME and WP_SITEURL constants, which override the dashboard settings.

If you recently moved domains, our guide on changing a WordPress site's domain covers the settings and redirects to check.

Are cookies being blocked?

Previews only work for logged-in users, so browsers or extensions that block cookies, and custom cookie domain settings, can make the preview treat you as a visitor.

Allow cookies for your own site in the browser settings. Privacy extensions are a common culprit.

If wp-config.php sets COOKIE_DOMAIN, make sure it matches the domain in your site URLs.

MDN's guide to HTTP cookies explains how domain and path rules decide which pages receive a cookie.

Is the browser blocking the new tab?

Preview in new tab opens a separate window, so pop-up blockers can stop it, especially after the first click; allow pop-ups for your own site and try again.

Look for a blocked pop-up icon in the address bar after clicking Preview.

Some browsers block new windows opened after a delay, such as while the autosave runs. Allowing pop-ups for your site avoids this.

Is the autosave failing?

The block editor saves changes through the REST API before previewing, so REST API errors, expired logins, firewall rules or server errors stop the preview from loading.

Watch for notices such as updating failed or the response is not a valid JSON response. They point to REST API problems.

Our guide on fixing REST API errors in Site Health covers the usual causes, from security plugins to server rules.

If you have been editing for hours, your session may have expired. Save the draft, log in again and retry.

Our troubleshooting guide for the WordPress editor not working covers other editor errors that block saving.

Is a plugin or theme conflict breaking previews?

Plugins that change URLs, add redirects, force logins, restrict content or modify queries can break preview links, so test with plugins disabled on a staging copy.

Redirect, membership, multilingual and security plugins are worth checking first.

Switch to a default theme for a moment as well. Some themes handle preview queries badly in custom templates.

Our guide on fixing plugin conflicts shows a safe order for testing.

Why does preview fail only for page builder pages?

Page builders often use their own preview inside the builder, and their front-end preview may need regenerated CSS or a cleared builder cache before it shows recent changes.

Use the builder's own preview button first, then regenerate its CSS files if the front-end preview still looks wrong.

Can a firewall or security plugin block previews?

Yes. Web application firewalls and security plugins sometimes flag the autosave request or preview parameters as suspicious and block them.

Check the firewall log at the time you clicked Preview. If a rule blocked the request, allowlist it for logged-in administrators rather than turning protection off.

Hosting firewalls can do the same. Ask your host to check their logs if no plugin shows a block.

Why does the preview show a 404 error?

A 404 preview usually comes from broken permalink rules, a redirect plugin, a URL mismatch or a custom post type that is not set up to be previewed.

Go to Settings > Permalinks and click Save Changes without changing anything. This refreshes the rewrite rules.

For custom post types, the developer must make them publicly queryable for previews to work on the front end.

Check redirect rules for anything matching your post URLs or query parameters.

Why does the preview look different from the live page?

Previews load without some caches and optimisations, and logged-in users see the admin bar and different scripts, so small layout differences are normal.

Compare with the published page in a private window rather than expecting a pixel-perfect match.

Optimised CSS from speed plugins can lag behind your changes. Purge it if the live page looks older than the preview.

Our guide on CSS changes not showing covers cache and minification issues behind these differences.

How do you stop preview problems from coming back?

Keep site URLs consistent, exclude logged-in users and previews from every cache, avoid unnecessary redirect rules, and test preview after adding caching, security or CDN changes.

Add a preview test to your checklist after any performance or security change. It takes a minute and catches broken cache or firewall rules before editors notice.

Keep WordPress, the theme and plugins updated. Many preview bugs are fixed in routine releases.

Frequently asked questions

Why does WordPress preview show old content?

A page cache or CDN is usually serving a stored copy. Make sure logged-in users and preview URLs bypass every cache, then clear all cache layers.

Why does WordPress preview ask me to log in?

Your login cookie is not reaching the preview URL. This often happens when the WordPress Address and Site Address use a different domain version or protocol than the one you logged in on.

Why does Preview in new tab do nothing?

Your browser is probably blocking the new window as a pop-up. Allow pop-ups for your site and try again, or use the desktop preview inside the editor.

Why is the WordPress preview blank?

A failed autosave, a REST API error, a PHP error or a plugin conflict can all produce a blank preview. Check the browser console, Site Health and your error log.

Can caching break WordPress preview?

Yes. If logged-in pages or preview links are cached, you see outdated or wrong content. Exclude them from page caching and CDN caching.

Sources

  1. Editing wp-config.php WordPress Developer Resources
  2. Cache Rules Cloudflare Docs
  3. Using HTTP cookies MDN Web Docs
  4. Console overview Chrome for Developers

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.