Links not working after migration (WordPress)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

I've had this before: After migrating a site, links within the site don't work anymore:

404 Not Found

Not Found
The requested URL was not found on this server.

Apache/2.4.41 (Ubuntu) Server at de.de Port 80

Brainstorm

  • wp-admin » Settings » Permalinks: save settings again + flush cash (or open a new Chrome Guest Session)
  • Missing section in AVHCF.

Case: 2024.04

This was a troubled migration. I had forgotten that somewhere along the way, I commented-out part of the AVHCF:

<VirtualHost *:80>

   ServerName de.de
   ServerAlias www.de.de
   DirectoryIndex index.php index.html index.htm
   DocumentRoot /var/www/de.de

   <Directory /var/www/de.de>

#      AllowOverride All
#      Require all granted
#      RewriteEngine on
#      RewriteBase /
#      RewriteCond %{REQUEST_FILENAME} !-f
#      RewriteCond %{REQUEST_FILENAME} !-d
#      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


   </Directory>

   LogLevel warn
   ErrorLog /var/log/apache2/error.log
   CustomLog /var/log/apache2/access.log vhost_combined

</VirtualHost>

After removing the comment signs above, it worked.

Sources