WordPress.org

Ready to get started?Download WordPress

Forums

Editing the url in the database, is it dangerous or just not the good way? (6 posts)

  1. su1
    Member
    Posted 2 years ago #

    Hello,

    I'd like to move multiple local WordPress install to my live server. My favorite solution for this is to export my local database, edit it and search and replace localhost/mylocaldomain.com by mylivedomain.com .

    I've read this is not a good solution as WordPress uses the length of the url and some features can be lost during the process (like widgets configuration).

    But, other than that, is it dangerous to do that, does it alter WordPress functions? I mean, if I don't have any widgets to save, can I use this method with no problem?

    Thanks.

  2. jnhghy
    Member
    Posted 2 years ago #

    Hi, depending on the theme that you are using you might get 404 instead of pages/posts that you have in your database.
    Also it might give you duplicated links. You can make a backup of your database and try it out ... if the testing goes ok ... then you can leave it like that.
    At some point on a project I had to do this and had issues with some duplicated entries ... which I fixed manually so ... it can be a go.
    Regards

  3. su1
    Member
    Posted 2 years ago #

    OK thanks.

    I only use Twenty Eleven and so far so good. But how do you see if you get duplicate posts?

  4. fonglh
    Member
    Posted 2 years ago #

    I haven't used this, but some of the other forum regulars have. This script does the search and replace for you and also handles serialized data correctly.

    http://interconnectit.com/124/search-and-replace-for-wordpress-databases/

  5. jnhghy
    Member
    Posted 2 years ago #

    I was speaking about duplicated links ... depending on the way you generate the link, there is a possibility to have duplicated content for the post/page link value; not sure right now how you can verify the database for duplicated entry at this point if I were you I would write a quick php script to verify the database just to make sure the links are unique but I'm sure that some google search will give you some sql ways to verify the link column for duplicated entry/ if the content is unique.
    Regards

  6. su1
    Member
    Posted 2 years ago #

    ok thanks guys

Topic Closed

This topic has been closed to new replies.

About this Topic