Friday, December 08, 2023

Wordpress permalink issue

One of our servers' site admins reported a problem, with "remove the index.php from the URL" - the standard method of 
WordPress dashboard --> Settings --> Permalinks --> "Post Name" Permalink, Save Changes
did not work for them. "File not found" error.

Checked the .htaccess file, it seemed to be OK.

But looking at how Apache handles .htaccess files, found that AllowOverride would be needed for the .htaccess files to work.

Following

https://ubuntu.com/tutorials/install-and-configure-wordpress#4-configure-apache-for-wordpress

added the lines

<Directory /oursrv/path/to/www/wordpress>
        Options FollowSymLinks
        AllowOverride Limit Options FileInfo
        DirectoryIndex index.php
        Require all granted
    </Directory>

to the relevant files in /etc/apache2/sites-available and then did

sudo service apache2 reload

The admins report that this solved the issue.

No comments:

Post a Comment