Background
As someone who develops multiple websites I wanted to be able to serve each site from within its respective project folder in the filesystem, instead of serving them all under the htdocs
directory.
So I moved my wordpress
folder (whose site was usually accessed via localhost/wordpress
) to my project directory, and followed the instructions in this answer to set up a virtual host with a DocumentRoot
and Directory
that matches the new location of the wordpress
folder. This is the whole (uncommented portion) of my httpd-vhosts.conf
:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "D:\Users\User\Documents\Projects\Websites\My New Project\wordpress"
ServerName localhost.irm
<Directory "D:\Users\User\Documents\Projects\Websites\My New Project\wordpress">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
The Problem
The homepage can now be found at localhost.irm
, but it's text-only, with no styles or images, and clicking on any page takes me to an "Object not found!" XAMPP page.
What I've Tried
Accessed the database with PHPMyAdmin, changing
siteurl
andhome
in thewp_options
table to reflect the new domainUsed the WP-CLI tool to search-and-replace all database instances of the old domain with the new one
Unfortunately none of these solved the problem.