Debugging permalink issue – WordPress Development Stack Exchange

Question

I moved a wordpress site into a subdirectory on the same folder and changed the WP address and site address to reflect this.

I then used search-replace on the database files to replace the previous url with the subdirectory url.

I then re-saved the permalink structure from the wp-admin control page and checked that the .htaccess file looks OK – it includes the following:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ./index.php [L]
</IfModule>

The old site home page loads, and I am able to access the wp-admin page, but none of the permalinks work. If I enter the url with the post/page id directly into the browser (eg. www.mysite.com/oldsite/?page_id=12 ) I can still access the content directly.

I threw the debugging script from here into functions.php and interestingly even going to the home site triggers an error (but without the script index.php still gets displayed presumably because the rewrite is handling the 404 error).
I have saved the debug script output here (forum won’t let me post here as it it thinks it is spam).

0
Dan 4 months 2022-04-12T05:49:53-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse