
Thanks to Tildmark and some of the comments for finally pointing me in the correct direction.
Mamp wordpress multisite subdirectory install#
Look for # localhost name resolution is handled within DNS itself.Īnd add the following just after that line: # localhost name resolution is handled within DNS itself.ġ27.0.0.1 v #change to match your Virtual Host.ġ27.0.0.1 #manually add new sub-domains.īe sure to do a fresh install for any WordPress Multisite installs that may require sub-domains.the file will be located at C:/Windows/System32/drivers/etc/hosts, where hosts is the file. Next head over to your Windows host file to edit your HOSTS.Be sure to change your ServerName and ServerAlias with the same as above.For example I’m working on a site called Eatery Engine so the following snippet will allow me to work with sub-domains on my local install:ĭocumentRoot "C:/xampp/htdocs/eateryengine" # change this line with your htdocs folder
Mamp wordpress multisite subdirectory code#
Now you can copy and paste the code above below to add your Virtual Host directories.With out that line of code you will lose access to your default htdocs directory. Options Indexes FollowSymLinks Includes ExecCGI At the very bottom of the file paste the following code:ĭocumentRoot "C:/xampp/htdocs" # change this line with your htdocs folder.Around line 19 find # NameVirtualHost *:80 and uncomment or remove the hash.Open the file named nf with a text editor.Navigate to C:/xampp/apache/conf/extra or wherever your XAMPP files are located.Be aware that late Windows machines might run it as a service, so check the box to the left of the Apache module.

Open the XAMPP control panel application and stop Apache.First I am going to assume you’re using a Windows machine and have XAMPP installed.I’ll also list some great posts which helped me get to my final goal. So, this post will cover how I got a sub-directory Multisite install working in Windows 7 with XAMPP. So dealing with a local sub-directory becomes hard to test and build when the live site is running sub-domains. Really there is nothing wrong with the above, but I’ve got a few WordPress multisite installs running that mimic live sites that use wildcard DNS with sub-domains.

This is almost a tutorial for myself, because on and off for the last few months I’ve been trying to get a Virtual Hosts set up on my local Windows 7 machine so I can run WordPress and WordPress Multisite.Ĭurrently I am using XAMPP to run Apache and MySQL, but it requires all local hosted directories to run under the “localhost” site, for example: or Virtual Hosts WordPress Check out the updated post on getting Localhost Wildcard Subdomains setup
