php - 403 Error - Wordpress link not working when permalink setting is set to 'post name'


I'm migrating my first Wordpress site to a live server. Eventually the site will have it's own domain name, but for testing purposes I have uploaded it as a folder within my own personal site.

All the pages work except the 'restaurant' page, which throws up a 403 error. The page is fine locally. It is worth noting that this page uses a different template to the other pages.

If I change the permalink structure to 'default', the page loads fine. Does anyone have any ideas of how to fix this? I have read that 'post name' isn't a great way of structure permalinks, but for the sake of this site (which only has a few pages) it is ideal, so I'd like to get it working if possible. Thanks.

This is what my .htaccess file is showing:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /moorfield/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /moorfield/index.php [L]

# END WordPress



you must have a conflict with the slug 'restaurant', check if you have a post or custom post type item that has the same slug.. also, try to resave the permalinks so as to flush the rewrite rules.. i usually have these problems when i have a custom post type rewritten with the same slug as an existing page




Sorry that I cant comment yet since I would have done instead of answering. But I am wondering if 'Restaurant' is a custom taxonomy.

Also, check your trashed pages and posts to see if any pages are there with the same permalink as /restaurant - and if so delete them.




Instead of using the rewrite rule, create an actual subdomain via your hosts admin tools. Then, regenerate the .htaccess file. So it will be:




Try flushing your Rewrite Rules with this plugin




make sure rewrite mode enable in your server first check in your server rewrite mode is enabled or not because this errors come only when the rewrite mode not enabled. and in localhost you can enable and apache2 extension rewrite then check it is working on not.




Maybe you should reset the permission of your 'restaurant' directory. More detailed info here:

People are also looking for solutions to the problem: php - CodeIgniter 'You did not select a file to upload' with ajax


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.