http://localhost/wordpress/about/ Not Found

Changing the permalink settings on a local development server I found that the page was not found when I chose the more usual Permalink setting based on Post Name.

I was observing the error:

Not Found
The requested URL /wordpress/testimonials/ was not found on this server.
Apache/2.4.33 (Debian) Server at localhost Port 80

The htaccess file looked to be correct:

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

# END WordPress

The page would show if I chose to follow the basic Permalink style of Plain with URLs shown in the form:

http://localhost/wordpress/?p=123

I enabled mod rewrite using

a2enmod rewrite

The message shown is:

Enabling module rewrite.
To activate the new configuration, you need to run:
systemctl restart apache2

As instructed I restarted apache

systemctl restart apache2

All was well I was now able to set the Permalink style to Post Name and view the pages on the development website in the more usual style:

http://localhost/wordpress/about/