Change of URL triggers update in database

For Installatron Sales: sales@installatron.com
Post Reply
jas8522
Posts: 61
Joined: Sat Jul 24, 2010 4:25 pm

Change of URL triggers update in database

Post by jas8522 » Sat Sep 02, 2017 11:07 am

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.

jas8522
Posts: 61
Joined: Sat Jul 24, 2010 4:25 pm

Re: Change of URL triggers update in database

Post by jas8522 » Thu Sep 28, 2017 9:45 am

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.

jas8522
Posts: 61
Joined: Sat Jul 24, 2010 4:25 pm

Re: Change of URL triggers update in database

Post by jas8522 » Mon Nov 20, 2017 9:45 am

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'

Phil
Staff
Posts: 490
Joined: Tue Jun 19, 2007 6:06 am

Re: Change of URL triggers update in database

Post by Phil » Wed Nov 29, 2017 2:39 am

Hello,

We're testing this change on the Edge channel.

Thanks,
Phil
Phillip Stier
Installatron Co-Founder

Post Reply