admin管理员组

文章数量:1125086

I have an issue on a domain with a freshly installed Wordpress. I try to change my permalink structure to be Post Name so that when I create a page with the name "Test" I should be able to access it by mydomain/test. However, when I try to click the link, or directly go to it, I get 404 page not found.

If I try to change permalink structure to the standard Plain and create a page then it works, but the URL is of course not what I want and something like mydomain/?p=123.

How can I create a page with the page name as slug?

I have tried all of the standard solutions to clear cache, go back and forth with different permalink options, reset htaccess but nothing works. The theme is just the standard twenty twentyfour.

NOTE I use the Classic Editor. If I try to use the default editor and try to publish a page with the permalink structure Page Name then I get the error "Publishing failed. The response is not a valid JSON response.". However, with the Plain permalink strucutre it works...

Extra

Here is my .htaccess if it helps:

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<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>

# END WordPress

本文标签: permalinksCreating Wordpress pages with post name as slug