WordPress Multisite Sub Domain Issues on VPS

Avatar
  • Answered
I had our WP multisite running on xampp and I had change my PC hosts file so that I could build, test, and run the domain and sub domain on my PC with their actual domain names. In other words, I would not have to search and replace any domain references when I uploaded the site to my InMotion VPS server.

I uploaded the site to my InMotion server and confirmed the WPMU settings in htaccess and wp-config. I created a wildcard subdomain (*.mysite.com) in cPanel subdomains. The root for this wildcard subdomain is currently /_wildcard_.mysite.com/

But when I access subdomain.mysite.com it gives me the "Index of /" page showing the cgi-bin folder. In the WP Network Admin if I try to go to the dashboard for the subdomain it gives me a 404 message.

So I moved the root of the wildcard subdomain to /public_html/_wildcard_.mysite.com/ and in the WP admin dashboard now I get the simple message "file not found" and not the standard 404 verbiage. If I go to one of the other options for this sub domain like "Manage Content" or "New Post" I get an internal server error:

[Mon Dec 11 18:59:20.172485 2017] [:error] [pid 25459:tid 140458986567424] [client xx.xxx.x.xxx:63102] File does not exist: /home/hilton25/public_html/_wildcard_.mysite.com/index.php, referer: http://www.mysite.com/wp-admin/network/index.php

On the front end it still goes to an "Index of /" page.

In the database the paths of both the root domain and the sub domain are correct.

I know that on xampp I had to edit the httpd-vhosts.conf and set up the VirtualHost where my ServerName and ServerAlias were my subdomain subdomain.mysite.com and I set a directory path of mysite.com/subdomain (this was an empty folder).

Do I need to do something similar with the VPS server? Do I need to manually add a zone? I'm sure this issue is in how I have things set up on the server, but I can't figure out what the problem is. Thanks for any assistance!



Avatar
IMH Support Agent 5
Hello, Thanks for submitting a question about WordPress multisite. Often, replicating a local server, or XAMPP, installation with a remote environment can introduce some issues. There may be a certain nested file missing in the transfer process. This makes the issues difficult to diagnose from a distance. I would recommend checking out a comprehensive answer posted to this forum a few years ago, which may help get you on the right track. Also, if you are sure that all the files are present and should be working correctly, you may wish to proceed with some common WordPress troubleshooting techniques like resetting permalinks, etc. Best, Christopher M.