• Resolved Patrick Toulze

    (@patrick-toulze)


    I do not work with WP often. I always have both the live site and a local clone (On Mamp) I just realized that WP doesn’t work with relative links but absolute. This is a major problem to develop a site locally or maintain a clone and send this site to the live environmemt. Do you have solutions?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    There are three ways to manage the links — all work using pretty much the same code. Basically, you do a search and replace for live domain -> local or vice versa using

    1. The plugin “better search replace” or
    2. The search-replace of wp-cli (see wp-cli.org) or
    3. this script: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Thread Starter Patrick Toulze

    (@patrick-toulze)

    Thanks Steven, the original site was 2 wp site one english and one french. I develop locally (Mamp) a unique bilingual (with polylang) from the french site. The result is now a mix of local url and original french and english url.

    Should I harmonized all that to my local url before migrating the site to it’s live environment or do it when live?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Polylang complicates things. I’d ask them what’s the best way to go.

    Thread Starter Patrick Toulze

    (@patrick-toulze)

    Thanks Steven, I finally harmonized all my url to my local server by a search and replace in the database.

    I will do the same when sending live.

    What a pain. I’m glad to work mostly with Joomla, maintaining a local clone is easy as pie. Any serious Dev need to maintain a local clone for backup & testing.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to control the internal links from Mamp to Live Site’ is closed to new replies.