Web tech note–Cannot show or preview draft post in WordPress

A quick techincal point answering an issue some users of WordPress have raised. I had this problem (that the Preview button did not work with draft posts). It could be because your browser is not accepting cookies.

In my case it turned out that this problem was caused by Varnish reverse proxy server (probably because my Varnish config file was stripping all cookies: well not all, if you let it strip cookies on the admin or login pages, you cannot log into your site). If you want to use the Preview button in this case, it is simply a matter of bypassing Varnish by adding the port number of the backend to the URL. If you are not administering your own server, it is unlikely Varnish is installed, and the cookie is probably going missing for some oher reason!

Leave a Reply

Your email address will not be published.