Forums

Relocating WordPress problems (9 posts)

  1. William Bowles
    Member
    Posted 1 year ago #

    for some time I've had a redirect installed on my old HTML site pointing to the WP installation (in the same directory) but needed to make the move permanent. This involved the host making a change to point to index.php in the WP folder and altering the wp-config.php to reflect the change.

    Old config:

    define('WP_HOME','http://williambowles.info/wordpress/');
    define('WP_SITEURL','http://williambowles.info/wordpress/');

    New url:

    define('WP_HOME','http://williambowles.info/');
    define('WP_SITEURL','http://williambowles.info/');

    (old url http://williambowles.info/wordpress, new url, http://williambowles.info), but I can't get it to work. The site comes up but it's text only, none of the links work and I can't get into the admin.

    Any ideas how to fix it?

    Bill

  2. Saildude
    Member
    Posted 1 year ago #

    This should help:

    if you're already set up successfully - just move your install to root now
    http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Within_Your_Site
    or
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

  3. William Bowles
    Member
    Posted 1 year ago #

    PS: I'm trying to figure out where the URL points to. Frustrating, I thought it was now pointing at http://williambowles.info bit when I changed the config to point to .../wordpress/ I get to the home page but when I try to access admin, the login page comes up but the path is:

    http://williambowles.info//wp-login.php?redirect_to=http%3A%2F%2Fwilliambowles.info%2Fwordpress%2F%2Fwp-admin%2F&reauth=1

    And when I type in the login info, it just cycles back to the login page. It gets worse, as I can access posts but can't return to the home page. It sounds like something is hardwired somewhere.

  4. misterpatrick67
    Member
    Posted 1 year ago #

    Have you changed the MySQL database? Log in using phpMySql and go under wp_options and change all the URLs. There are two that really need to be changed – Site URL and Home. The one is on the first page, the second is on the second. The other option is to export the entire database and check "Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT". Open the database up in a text editor and find and replace all instances of your URL. Then Import the database back in. By adding the Add Drop it will replace all of your fields with the imported ones. I move sites all the time using this method as I initial developed on WIP subdomains. If you have any trouble with any of this let me know and I'll walk you through it.

  5. William Bowles
    Member
    Posted 1 year ago #

  6. William Bowles
    Member
    Posted 1 year ago #

    misterpatrick67

    Ok, I did both, changed the two urls, exported the db inc the drop tables, did the find/replace (around 218) and reimported the db.

    Tried to login and it still gives me a redirect (cleared the cache of the browser, quit it and tried to login again, no dif).

    Bill

  7. William Bowles
    Member
    Posted 1 year ago #

    PS:

    This is the path I get when I try to login:

    http://williambowles.info//wp-login.php?redirect_to=http%3A%2F%2Fwilliambowles.info%2F%2Fwp-admin%2F&reauth=1

    BTW, when I exported the DB the only option was
    "Add DROP TABLE"

    Couldn't find these:

    VIEW / PROCEDURE / FUNCTION / EVENT".

  8. William Bowles
    Member
    Posted 1 year ago #

    Update:

    Went into MySQL again and did a search for wp_users and found my entry, discovered that it showed http://www.williambowles.info/wordpress/ so I changed it, first to http://www.williambowles.info/, that didn't work then to http://williambowles.info/ and that didn't work either, still getting the same redirect:

    http://williambowles.info//wp-login.php?redirect_to=http%3A%2F%2Fwilliambowles.info%2F%2Fwp-admin%2F&reauth=1

    not sure where else to look.

    Bill

  9. William Bowles
    Member
    Posted 1 year ago #

    Update,
    I'm clueless about MySQL but I've been going through it via phpadmin and discovered that the changes to the url that I uploaded the other day have all reverted to the old url! I exported wp_options again, changed it, uploaded it (again) but the changes don't take.

    I also found a bunch of the incorrect urls that I also changed and uploaded but so far nothing seems to work.

    The hosting co sent me this, though I don't have any idea as what it means:

    One thing I've noticed, though, is that you only appear to have one set of wordpress tables in the database, which is probably confusing things somewhat (though I can't see how it would create this particular problem). When installing, you're given the option of configuring a different table prefix (wp_ is the default, wp2_ is a reasonable one to use), and should take this option in order to start afresh; so many of the settings are configured in the database that to get away from the old, broken, ones you really need to be using new tables.

    If we you get down to just one, working, install of WordPress configured as it was before we started this move, then install another, totally separate, instance of it with a different directory hierarchy and a different table prefix, migrating the data across should be trivial, without inadvertently taking any legacy configuration.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.