Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1136781
    Imran Mughal
    Participant

    I’m using the latest version of “X” and am struggling with the header image (logo) being hard-coded.

    I need to have the logo inserted as a relative link because we have 2 site instances: a development/testing instance, and our production instance.

    I start by taking a snapshot of the site (db + files) from PROD, then move it to the DEV instance where I make my changes, and then roll those changes back into PROD. This is why moving the site is so important.

    I’ve added 2 lines in my wp_config to use the hostname as the site URL. Doing so means that in Settings > General, the site URL is greyed out:

    define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’]);
    define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’]);

    However, when I take a snapshot and move the site, the logo still points to the wrong instance.

    I’ve currently setup a sandbox environment to find a solid solution.

    http://alpha.imranmughal.com is my “prod” dummy.

    and http://beta.imranmughal.com is my “dev” dummy.

    When I take a snapshot of the site from alpha -> beta, the logo still points to alpha.

    What’s the best way to address this problem, and user requirement?

    Regards,

    Imran.

    #1136918
    Christian
    Moderator

    Hey Imran,

    X does not have hard coded elements. Regarding the logo, it just gets the URL from the database. That said, the issue is with your staging to production setup. You might have missed updating the URLs in production database to your production domain.

    Here’s an article to setup a staging environment http://www.wpbeginner.com/wp-tutorials/how-to-create-staging-environment-for-a-wordpress-site/. Implementing this falls outside the scope of our support though. If you’re not comfortable doing the setup, please consider moving to a web host with staging to live feature.

    Thanks.

    #1137467
    Imran Mughal
    Participant

    Thanks. Much appreciated. Just looking at the workflow now to see if I might have missed something.

    Cheers!

    #1137577
    Darshana
    Moderator

    Let us know if you need any further assistance.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-1136781 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>