Search code examples
phpwordpressmod-rewritepermalinks

Problem with permanent links in WordPress and inbound posts


I currently use version 5.1 of Wordpress, followed by busiprof theme, I do not have any other installed nor do I have a plugin installed.

The problem is that every time I go to Settings> Permanent Links>Post Name> Save Changes, then I try to publish a post and it does not leave me, nor update it. But above the field of categories and labels when creating a theme or update it disappear.

I have the rewrite module activated, and of course, every time I follow the aforementioned route, it creates a .htaccess with the following content:

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


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

# END WordPress

I don't see the problem.


Solution

  • I don't know why there are two sets of identical rules in the .htaccess file. Try deleting the top set or rewrite rules just leave this one:

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

    If that doesn't work just delete the .htaccess file all together and re-save permalinks.