Wordpress Update - Path Moved

I have Wordpress installed in a test location, domain.com/test...then, once it is running right, I move it to TLD, domain.com. Once an upgrade is available in Virtualmin, it fails because it can no longer "see" the Wordpress install in domain.com/test. How do I tell Virtualmin the install path has moved?



Howdy -- well, remember that it wasn't really designed to work that way, so that'd require manual updates in both Virtualmin as well as WordPress.

Knowing that -- to tell Virtualmin that you're moving WordPress to a new location, you'd just need to edit the install script data for that installation.

To do that, you can edit /etc/webmin/virtual-server/scriptlog/$DOMAIN_ID/$SCRIPT_ID.script

And then, change both the "opts_dir" and "opts_url" parameters.

None of that would update WordPress itself, you'd need to go into your WordPress config and manually update that (which is sounds like you know how to do).

Thanks... I think what is going on, rather than move the install, I changed apache to point to domain.com/test instead. I guess I really messed that up. I just do the manual upgrade.

Seems to me, a developer may want to install a script in a "secret" test location, get everything working, and then move it to the live spot...but once it is moved, the upgrade script breaks.

I have asked Joe/Jamie to allow editing the install data for such reasons but I don't think this was ever really discussed and I think it should be. If VM can read it why can't we edit it ?

The issue is that even if you change the path Virtualmin uses for the script, there may still be places in the script's configuration files and DB tables that need to be updated as well. So for it to work properly, the user would have to make all the needed changes manually ... or Virtualmin would need to have the ability to move a script to a new directory, which is pretty complex.

But being able to edit the data is half the work done.

If developers already know they have to edit the db's then your reason is moot.

So, is the fix to backup the test dir, blow it out, install it from the script in the new location, then restore the backup data into the new location?

Well, unfortunately, there's no good way of moving it today. Virtualmin doesn't have any tools available to simplify the process.

If you want to move it, I'd probably recommend looking up details within the WordPress documentation on the best way to move a WordPress install to a new URL/location... and once you've done that, modify the Virtualmin Install Script data as described earlier.

Having the ability to move a script sounds like a good idea for a future Virtualmin release though - I'll add it to my TODO list.