Preview Posts doesn’t work after SIteURL change
-
A fresh install of WordPress in a sub-directory. Enabled Pretty Permalinks. -All checked and works.
Immediately after enabling Permalinks, i changed the SiteUrl in General Settings for my Site to http://domain.com . -This also works in the front-end.
*However, i can no longer preview Posts; either a new Post, or changes i’m making to an already published Post.*
The message in the preview-window that is opened says: “Sorry, you are not allowed to preview drafts”, on an otherwise empty screen.
I’m pretty sure now that i’ve done the installation correctly; that the .htaccess has been updated during Permalink and URL changes, then copied over to root directory; along with index.php, which has been appropriately edited.
-
*index.php in root-directory* looks like this:
<?php
/**
* Front to the WordPress application. This file doesn’t do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*//**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define(‘WP_USE_THEMES’, true);/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . ‘/sub-directory/wp-blog-header.php’ );.htaccess in root-looks like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /sub-directory/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /sub-directory/index.php [L]
</IfModule># END WordPressdirectory
.htaccess in the install (root) directory looks like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /sub-directory/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /sub-directory/index.php [L]
</IfModule># END WordPress
The topic ‘Preview Posts doesn’t work after SIteURL change’ is closed to new replies.