WordPress Preview Drafts Error

By | August 25, 2016

You have logged into your wordpress admin panel. Created a new post and before you hit the Publish button you wanted to preview your button.
But when you clicked the preview button all you can see on the new page is the following error message.

Sorry, you are not allowed to preview drafts.

You are not alone. Here is the solution:

1. Check your .htaccess file

If you have made any changes to your settings like permalinks, you may have to update the .htaccess file. Normally wordpress will automatically update this for you. But sometimes due to permission issues wordpress may not able to re-write your .htaccess file. In that case you may need to copy and paste the code into your .htaccess file and upload it your server using ftp or file manager. Alternatively you can change the permission of the .htaccess file though it is not recommended for security reasons.
wordpress htaccess code
You can find the required wordpress .htaccess code if you go under settings > Permalinks.

2. WordPress address setting

If your .htaccess files are correct and if you are still getting the “you are not allowed to preview drafts” error, then check your WordPress Address (URL) and sit address(URL) settings. If they are not the same, then you will get this error. If one is www version and the other is non www, then change both to wither www or non www whichever is your preferred version.
wordpress settings

You can find this by going to Settings > General on the left menu.
Once you change this and save it, go to the post you were writing and hit the Preview button again. You should be able to preview your post now.