Skip to content

Stop Setting the URL Constants #35

Closed

Description

@jimmynotjim

I've found an issue with setting the WP_HOMEURL and WP_SITEURL constants in the wp-config.php file. When site_url(); or home_url(); are called within the theme they fail to output the actual url (either nothing at all or just /wp). It seems we've been through this before with Genesis but I'm not sure if that was changed for a different reason.

Activity

  1. ericclemmons commented on Dec 11, 2014

    @ericclemmons
    Contributor

    I think this is intentional (because of my research with Bedrock & multi-env WP installs), because these constants are used in tons of places (particularly data and URLs saved to the DB) that'd otherwise have to be corrected.

    The hope is that these URLs return / or /wp so we have path-only URLs.

    What's the best way of handling this?

  2. jimmynotjim commented on Dec 11, 2014

    @jimmynotjim
    ContributorAuthor
  3. ericrasch commented on Dec 11, 2014

    @ericrasch
    Contributor

    Timely... this article was just published on the wp-config.php. Looking at the 1. WordPress URLs section, there's a link that goes to this article: http://pressing-matters.io/using-wp_siteurl-and-wp_home-to-migrate-a-wordpress-site/

    It's worth a quick read.

  4. ericclemmons commented on Dec 11, 2014

    @ericclemmons
    Contributor

    I'll have to check again. I remember lots of experimentation leading to introducing these constants back in (in addition to the content directory change), particularly around uploads.

    I have to say, I didn't have intermittent issues like @jimmynotjim described with how the generator works:

    https://github.com/evolution/wordpress/blob/master/lib/yeoman/templates/web/wp-config.php#L31-L43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions