I can not customize my WordPress permalink structure on my development server and have the URL's point to my desired pages, unless the permalink structure includes /index.php/ at the beginning of the custom path expression. Such custom permalinks are being configured in the WP Dashboard, Settings > Permalink Settings.

I don't get it, so I always just choose "Plain" for WP installs on my dev server. Not a proper way to go about it of course.

After 10 yrs and finally getting around to caring about it, something occurred to me. Perhaps it has to do with the fact any production environment i've ever used, has the WP install at ./public_html/index.php ./public_html/wp-content/ (etc.)

On my dev server, it would be however, ./public_html/wp_container/index.php ./public_html/wp_container/wp-content/ (etc.)

So, the .htaccess file looks like the following (note the last line):

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

Anyone know if that is in fact what's causing the issue? If so, how to get around it?


1 Answer 1



This is Apache2 on Debian:

added the following to the ./sites-available/wp_container.conf virtual hosts file. Note that AllowOverride must be placed inside <Directory ...>

Include conf-available/rewrite.conf
<Directory /var/www/html/wp_container/>
  AllowOverride All

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.