WordPress.org

Ready to get started?Download WordPress

Ideas

Stop hard setting GUID and assign dynamically

  1. prw
    Member

    12345

    Anyone else tried to move a wordpress installation and had to get their SQL code books out to change the GUID on every item, when their IDs are enough to access them inside the admin or outside on the website?

    the_permalink() and $post->guid

    should simply access the url from get_option('siteurl'), the the ID number from the element being accessed...

    Posted: 4 years ago #
  2. Robert Chapin
    Member

    12345

    If I understand what's being said between the lines here, OP is whining about the use of full URLs in the GUID column, such that the host name and path becomes invalid for every object in the post table after a site move. This is an age old design flaw in WP that probably has many duplicate threads/tickets laying around.

    Posted: 4 years ago #
  3. syncbox
    Member

    wow, I don't find making changes that hard. I just export the database tables as an .sql file, then do a find and replace for all "example.com" domain names with the new domain name... in fact, just the example portion would be enough, if it is unique to just the domain name...

    For example, let's say you develop in a sub-domain... dev.example.com and now you want to move the wp site to example.com/myblog/...

    Find and replace dev.example.com with exaample.com/myblog/

    Then go back into your database, drop all the tables, then reimport all the tables.

    Posted: 4 years ago #
  4. rafaelxy
    Member

    It's not about being easy or not. It's about taking one less step EVERY time you have to change the URL.

    Imagine a scenario that you have wordpress plugins development, separated in developing, staging and production. Every iteraction of deploying the application you have to do this pain in the ass step.

    Posted: 3 years ago #
  5. I actually think its a veeery interesting idea..

    +1
    Great Idea!

    Posted: 3 years ago #
  6. I actually think its a veeery interesting idea..

    +1
    Great Idea!

    Posted: 3 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    17 Votes
  • Status

    Sorry, not right now