Which Hypernode features would you like to see?

een commando om de 8880/8443 poorten aan de staging urls toe te voegen op basis van http(s)

Een commando om de poorten aan de staging urls toe te voegen op basis van http/https. handig voor shops met veel winkelzichten.
Of misschien 1 commando die live dumpt, upload naar staging en urls in 1x aanpast?

3 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Mike de Landgraaf shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

2 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Mike Branderhorst commented  ·   ·  Flag as inappropriate

    $ mysqldump --no-data --add-drop-table staging_magento | grep "^DROP \| FOREIGN_KEY_CHECKS" | mysql staging_magento

    $ mysqldump public_magento | mysql staging_magento

    $ mysql

    UPDATE `core_config_data`
    SET `value` = CONCAT(SUBSTRING_INDEX(`value`, '/', 3), ':8880/')
    WHERE `path` LIKE 'web/%secure/base%url'
    AND `value` LIKE 'http:%' AND `value` NOT LIKE '%:8%';

    UPDATE `core_config_data`
    SET `value` = CONCAT(SUBSTRING_INDEX(`value`, '/', 3), ':8880/')
    WHERE `path` = 'admin/url/custom' AND `value` != ''
    AND `value` LIKE 'http:%' AND `value` NOT LIKE '%:8%';

    UPDATE `core_config_data`
    SET `value` = CONCAT(SUBSTRING_INDEX(`value`, '/', 3), ':8443/')
    WHERE `path` LIKE 'web/%secure/base%url'
    AND `value` LIKE 'https:%' AND `value` NOT LIKE '%:8%';

    UPDATE `core_config_data`
    SET `value` = CONCAT(SUBSTRING_INDEX(`value`, '/', 3), ':8443/')
    WHERE `path` = 'admin/url/custom' AND `value` != ''
    AND `value` LIKE 'https:%' AND `value` NOT LIKE '%:8%';

  • AdminHypernode Dev Team (Developer, Byte) commented  ·   ·  Flag as inappropriate

    Hi Mike,

    I believe you have been in touch with our engineer Flip regarding this.
    Flip created a snippet of code which in my understanding does exactly what you want.

    It will fetch the production urls and set the equivalent staging urls in the /data/web/staging magento1 installation.

    Use at your own risk!

    The snippet is here:
    https://gist.github.com/hn-support/d7a6fdd89bd78ebd7a03982605743616 (for m2)
    and
    https://gist.github.com/hn-support/faf03c5898f5553b7fd9f4059709aef4 (for m1)

    If this feature request gets many votes we may improve this script (if needed) and ship it on all hypernodes.

    Let us know how it goes!

Feedback and Knowledge Base