first of all thank you for this great tools and this nice community. I’ve been reading the posts here for some time now and they have almost always solved my problems.
But now I am stuck with a problem I can’t explain and decided to sign up here to ask for help.
I’ve a local dev environment (with Vagrant and Scotch Box as LAMP stack) in which I had a normal Bedrock installation running. Then I converted the site into a multisite installation (domain-based) and added a new sub-site. After this I mapped a new local domain to the sub-site. So everything looks like this:
Sub-site: mysubdomain.myfirstdomain.local then changed to myseconddomain.local
Everything is working fine locally. The main-site is available under myfirstdomain.local and the second site is available under myseconddomain.local
Now for testing I’ve uploaded all the needed files to the live server (hosted on SiteGround). I’m not using Trellis or something else. I do it by hand at the moment.
I replaced the local domain names in the database via “wp search-replace” like this:
Main-site: myfirstdomain.local -> myfirstdomain.example. com
Sub-site: myseconddomain.local -> myseconddomain.example. com
(Please ignore the space before “com”. I had to put them there because there is no way to remove the link and as a new user I’m only allowed to post four links)
I modified the .env and changed the variables. I changed the webroot of both subdomains to the /web/ directory.
Then I opened myfirstdomain.example. com in my webbrowser and got immediately redirected to myfirstdomain.example. com/wp-signup.php?new=myfirstdomain.example. com. Same for myseconddomain.example. com which got redirected to myseconddomain.example. com/wp-signup.php?new=myseconddomain.example. com.
Both show a 500 Internal Server Error and backend and frontend are not working.
Some additional information:
- There is no www
- There is no SSL
- I use the multisite-url-fixer mu-plugin
This is what I tried so far:
- I’ve checked the error logs (empty)
- I’ve checked the file permissons
- I’ve checked the PHP version
- I’ve checked the application.php for misconfiguration
- I’ve checked the .htacces in /web/ for misconfigruation
- I’ve set the webroot to the directory below /web/ and used a .htaccess in there to rewrite to the /web/ folder because I thought the webserver can’t read the .env file due to the fact that it was below the webroot before
- I’ve cleared my cookies and cache
- Removed all plugins and themes
It seems like WordPress is doing something because of the redirect but I can’t find the problem.
As I mentioned I’ve changed the domains from local second-level domains (e. g. myfirstdomain.local) to live third-level domains (e. g. myfirstdomain.example. com). Could this be a conflict with the multisite functionallity because it is a domain-based installation which normally uses subdomains? Please take a look again how I changed the domains.
I hope you understand my problem. If you need more information please ask.
Just to clearify: The mentioned (sub-)domains are not the domains I use.