Softaculous


Topic : Cloned WordPress gives page not found and admin logon redirects to original site


Posted By: litebit on July 6, 2018, 8:51 pm
Hi,
I'm trying to clone a Wordpress site for development, but
  1. the cloned site gives a 404 page not found,
  2. trying to access the admin login page, redirects to the admin login page of the original site.

Software and Versions involved are :
  • - Softaculous 5.0.4
  • - WP version 4.9.6 (the cloned version seems to be upgraded automatically to 4.9.7??)
  • - Directadmin


Original site : (https) www domainname com
Cloned site (on a subdomain and folder) : (https) test domainname com / dev

Is there anything I
a) should do on the original site before cloning or
b) can do on the cloned site to fix it?

Keeping in mind that we'll have to clone the site every few weeks

I appreciate any advice or feedback
Thanks



Posted By: Brijesh on July 10, 2018, 2:33 pm | Post: 1
Hi,

We are unable to replicate this issue on our test servers.

Can you please open a support ticket with us so that we can check this for you :
https://www.softaculous.com/support/

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: litebit on July 11, 2018, 9:59 pm | Post: 2
Hi,
I was able to fix it manually.
The problem seems to be your "clone function" not doing a needed DB update for the cloned site to work correctly?
in the database, the table "wp_options" or "wpxi_options" (depending on the installation by Softaculous), 2 records need updating :

where option_name = "home"
option_name = "siteurl"

replace the URL of the "old" site with the url of the new/cloned site.
for example with SQL :

UPDATE wp_options SET option_value = replace(option_value, 'oldurl', 'newUrl') WHERE option_name = 'home' OR option_name = 'siteurl';

Doy you want me to create a support or bug ticket for that?



Posted By: Brijesh on July 12, 2018, 7:09 am | Post: 3
Hi,

We do update the installation URL with the new URL in the options table. Infact we also replace the URLs in all other tables as well.

We tested the same on our test servers and the URL is indeed replaced with the new one.

If you can open a support ticket with us we can check why the URL was not replaced in your case.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: jpluttme on September 23, 2020, 3:18 pm | Post: 4
Also had this issue.  The database for the staging site was not updated and following the OP's instructions for changing the url values in the table worked.

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.