WordPress.org

Ready to get started?Download WordPress

Forums

wordpress portability? (11 posts)

  1. significance
    Member
    Posted 4 years ago #

    i find it really frustrating moving wordpress from server to server and to a new url.

    this is mainly due to the fact that the url is hard coded in the database, requiring me to open up the sql and do a find and replace.

    is there an easy way to do this that i'm missing?

    if not, then would it be possible to make wordpress more portable? i would be happy to help design/code the feature.

  2. is there an easy way to do this that i'm missing?

    Yeah.

    http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_to_a_New_Server

  3. significance
    Member
    Posted 4 years ago #

    surely it would be possible to use the $SERVER globals to get the 'blog url' rather than making entries in the database with the http://blog.url/ part of the url?

    that would make the process so much easier, since you could just backup/reup the database using your normal database admin tools without messing around...

  4. Yes and no.

    WordPress runs on many different types of servers, and they aren't all configured the same same. By having thw blog URL (and home URL) definable, you open up the software for a myriad of possible configurations.

    Heck, you can even use one WP install for multiple domains, if you do it right :)

    Your change would work, but it would limit WordPress.

    And if making ONE change before exporting your database is too much work, well, to each their own :)

  5. significance
    Member
    Posted 4 years ago #

    i can see where you're coming from, but for me the url should be defined either in the wp-config.php file with the database details or not at all.

    i don't know too much about server compatibility so couldn't comment :)

    thanks for your answers!

  6. i can see where you're coming from, but for me the url should be defined either in the wp-config.php file with the database details or not at all.

    You CAN override the database with the wp-config file.

    define('WP_HOME','http://example.com');
    define('WP_SITEURL','http://example.com');

    Done. :)

  7. significance
    Member
    Posted 4 years ago #

    ah - excellent.

    i have noticed other entries in the sql file but that is maybe just a dodgy plugin..

    thanks!!! :)

  8. Oh, there are other entries, alas :/ Probably images. Moving a server to a new URL is always a pain in the backside.

    These directions are pretty straightforward about it: http://yoast.com/move-wordpress-blog-domain-10-steps/

  9. significance
    Member
    Posted 4 years ago #

    ah - i see. that would explain me being linked to this ticket http://core.trac.wordpress.org/ticket/11394

    their solution seems awfully complicated though - surely it's just a case of concatenating $blog_url on to the relative url of the image?

  10. It's not as simple as that, though in many ways I wish it could be. :/ It's a complicated fix because the setup is complicated in order to support all options it currently supports, and going forward.

    I don't envy the people working on it.

  11. MichaelH
    Member
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic