I am migrating a WordPress site from one server to a different one for a client. I ported all the themes and wp-config.php files (wp-content folde, wp-config.php and the entire database) as I've seen in tutorials. The domain name isn't changing, only the host server (so basically a new IP address).

The site works well on the new host. On the domain name site also the IP address it should point to has been updated. This new host is a raspberry pi , so all necessary set ups have been done (port forwarding and such).

The problem is that only the home page is getting served by the Pi. All other pages get served by the old host. Also the image URLs (and it would seem all the internal linking to other pages as well) point to the old host. If the site gets taken down from the old host, all pages except the home page return a 404.

Since the domain name isn't changing, I don't know how to use Velvet Blues to port the URLs. What should I do ?


This is probably because .htaccess is not being respected.

If you're using Apache as a webserver, make sure that mod rewrite is active and .htaccess files are read and used in vhosts. You should allow overrides in the vhost. Like this:

<Directory /var/www/site/example.com/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

If you are on Nginx, it will do nothing with .htaccess and you have to create rules in the server block to make sure rewrites (pretty url's) work. Like this:

location / {
    try_files $uri $uri/ /index.php?$args;

Not the answer you're looking for? Browse other questions tagged or ask your own question.