Page 1 of 1

Change of URL triggers update in database

Posted: Sat Sep 02, 2017 11:07 am
by jas8522
Hey there,

This is a feature request.

When changing the URL that an app is installed to (such as is necessary after the domain has changed), it would be great if Installatron could do a quick Find/Replace in the database for all instances of the old URL and update them to the new URL.

Currently, a domain change looks like this for WordPress:

1. Change domain in control panel
2. Change URL in Installatron (so it knows where to find the app)
3. Find/Replace URL in app database manually

I'd like for #2 to automatically complete step #3 as well. This way, ultimately, I might be able to get a hook built for the control panel that ensures that #2 is run automatically when #1 happens, making this whole process much simpler for the end user.

Thanks, as always, for considering.

Re: Change of URL triggers update in database

Posted: Thu Sep 28, 2017 9:45 am
by jas8522
Update: it appears Installatron *does* do this already for us! The problem is that it seems to miss the upload_path value in the wp_options table. Ironically I *think* Installatron sets up that value for us in the first place when the site is installed (normally it's a relative path as default, I think?)

It would be great if, when changing the domain, Installatron could simply remove any set upload_path in the DB, as the default value seems to work fine.

Re: Change of URL triggers update in database

Posted: Mon Nov 20, 2017 9:45 am
by jas8522
Turns out this upload_path value causes problems all over the place. From imports/migrations to URL name changes to cloning sites.

I'm hoping Installatron will add the functionality to remove that value from the database (as the automatic detection in WordPress seems to work fine), after any of these actions is taken:

- Change of URL
- Import from external source
- Clone

Any of those cases will change that path value, and thusly cause open_basedir errors and a really slow or entirely broken website unless we manually remove that value at the moment.

This is all it takes:

Code: Select all

DELETE FROM wp_options WHERE option_name LIKE 'upload_path'

Re: Change of URL triggers update in database

Posted: Wed Nov 29, 2017 2:39 am
by Phil
Hello,

We're testing this change on the Edge channel.

Thanks,
Phil