hi to everybody!
i find this problem a long time ago. i have 3 servers builded in diferent moments and all of them show the same behavior.
if i need to change domain name for any reason ( sometime customer delay domain´s buy for diferent reason and we build the website ( based in WP) whith a alternative domain) .
i try with “Change Domain Name” or “Clone Virtual Server” but we get same result. white page or “ERR_TOO_MANY_REDIRECTS”
if i open domain.tlb/reamde.html if works, but teh rest of php files from wp are dead
More, if a rename again to the previous domain, site remain dead
ideas?
well, php log dont shop anything. i change url lines in wp_options , and no work. and i can tell yo more, phpmyadmin dont work too. everything in php,
i create test.php example in main directore, same result
i make forced change of php version… nothing
more if press php icon , nothing
but only in domain change virtual server, the rest of VS work normally
i only find 1 error while i tried to change php setting
" … failed! Not a HASH reference at /usr/share/webmin/virtual-server/php-lib.pl line 2431. "
php-lib.pl affect to all VS, pero only affect this error a this VS
i only see this error in one tried, i made severals w/o error , but php still dont work
the funny thing is , if i read this support/guide , when i search for restore to different virtual server ( if I tried to “move” web site to a diferent place) support say:
"One way to do that would be to migrate your domain as-is to the new server, and there, just rename the domain to the new domain name.
You can change the domain name by going into Server Configuration → Change Domain Name.
"
Add an alias onto the current virtual server for the ‘old domain’.
What this will do is allow the loading of the website using the old URL if WordPress is not configured properly and it is for some reason still using the old URL.
It is not just in wp_options that Wordpress stores URLs in a serialized format (which is stupid). I run a plugin called
if i open domain.tlb/reamde.html if works, but teh rest of php files from wp are dead
More, if a rename again to the previous domain, site remain dead
ideas?
The site is not dead, WP doesnt like being moved.
Have you added .htaccess redirect rules, you should remove these
i preciate your advice about wp moving, but the problem has no relation with wp, because after change domain, i canoot open any php file, for example my test.php that include phpinfo(), and if a try to launch any html file , same result. err_too_many_redirect
i cannot try for a few days, because i tried so many times ( rename, restore rename , etc) and now i receive LE erros ( so many time, wait 168 hours)
now i create a empty VS, with a ddns domain, and i test html and phpinfo file, ok
when change to another domain. PAF
no answer error “err_too_many_redirect”
Try to forget about loading a WP application.
This is not a fault of Virtualmin (why people should even think Virtualmin has some idea of how to fix a web application stuffed into it I don’t understand)
On a working Virtualmin (one that has been installed on a clean OS) install the VS and test it before you add a web application such as WP. It works.
Then install the core web application → it still works.
(if it doesn’t make sure the PHP execution mode is correct)
Then load the plugins/themes testing as you do.
If it breaks it is because of broken code in the web application. That is where the solution should be found.
So you have(had) a working domain + website with alt.tld and now the client has purchased a different domain new.tld
The route to manage this is to get the new.tld to resolve to your new clean VS.
then simply redirect the alt.tld to new.tld
then make the changes to the web application code before the registration expires for alt.tld (that should be the responsibility of whoever wrote the cluster f### of code that is claimed to be an application) hard coding urls is about as bad as the famous Y2K bug) no excuse for it not even for a novice programmer.
ok, if you are right, my problem is no related with virtualmin.
in this case, because i tried 30 times w/o success, i lneet to think that my scenario has a problem
I going to detail it.
I create a VS with domain domain.dynu.com ( its a ddns company) every think work properly ( i tried with or w/o WP)
i change domain to domain,tld or domain2.dynu.com.
CRASHH
no more HTML or PHP
if i re-change to original domain , CRASH remain
Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
That is step 1 - and great, it works.
Now create a second VS with the new.tld your customer’s newly registered domain. - just make sure the DNS records are good and they point to the IP of the box.
again if all is working you will see the default Virtualmin landing page.
the next step is a redirect.
Select the new.tld in Virtualmin go to Server Configuration -> Website redirects -> Add a New Redirect complete the form
now when someone visits the new site new.tld they will land on the old site (which of course still works).
Now all you have to do is fix the broken WP code that is referencing urls (and potentially other careless code. - look for anything hardcoded (you/or more likely the client’s WP guru (claimed) should be doing that)
ok stegan, i understand your instruction. i can do it. my question is : is not posible rename domain using change domain option?
i have another question, if i use your concept, i need to use 2 domain forever and i never cannot eliminate old domain. is it correct?
tx for you time
Only until the old domain expires by then the client should have learned how to fix the website code (at which point you remove the redirect link and just let the old one expire/remove it.)
It is not to be seen as a permanent solution.
I do not know if “change domain” works or not. I would expect it to, but never have had to try it. I find it difficult to see how it can as so much is dependent on DNS and all my DNS is handled at the registrar or VM provider.