WordPress.org

Forums

[resolved] Moving to root directory (6 posts)

  1. ITGuy
    Member
    Posted 1 year ago #

    Hi If anyone can help, it would be very much appreciate.

    I just moved my files from "/wp" to root directory, but I might be missing something since the webpages have a different format and color.

    Steps taken

    1. Renamed file “.htaccess” file to “.htaccessant” in the root directory since it is also under the “/wp” folder.
    2. Copy files from “/wp” directory to root directory
    3. Logged into WordPress and on Settings> panel changed the site address field (URI) and site address (URL) removing the “/wp” folder.
    4. Created a new data base “xxxx_wp190”
    5. Assigned a user to the database “xxxx_wp190”
    6. Edited “sql” replacing all “xxxx.com/wp/” to “xxxx.com/”
    7. Edited “sql” replacing all “/wp/” to “/”
    8. Import “sql” database from previous databse (wp189)
    9. Edited “wp.config.php” on root directory replacing all database from 189 to 190 and password “xxxx”
    10. In the database table "wp_options" (through phpMyAdmin or similar) updated siteurl removing “/wp”.
    11. Logged into WordPress and install plug in “Velvet Blues Update “
    12. Go to Tool>Update URLs and change old to new directory
    13. Checked under Settings>General> Site URL and still had the "/wp", I changed site address again (URL) removing “/wp”. Saved changes.
    14. Sandbox has also a table “wp_development_options. Changed siteurl removed”/wp”

    When checking previous and new pages, the color and format have changed. Any feedback on things I might have done wrong or missing.

    Thanks.

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Try reviewing Moving_WordPress.

  3. ITGuy
    Member
    Posted 1 year ago #

    Thanks esmi. I was following those steps, but right after I reached number 6, I had to look for other blogs since it was a bit confusing. I think the blog is missing some steps I outlined above. Probably 14 is not for everyone since the "sandbox" option is fairly new.

    Any other suggestion?
    Thanks,

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    There is no reference to "sandbox" on the page I linked to above.

  5. ITGuy
    Member
    Posted 1 year ago #

    Yes, I know.
    I was testing the new "Sandbox" plugin before I moved to the root directory and I created a Sandbox called development and that is why WordPress adds a new table in the database with "wp_<sanbox>_options" which has a column "siteurl" that also needs to be updated.

    I guess my main problem right now is that all the customization done to the theme I used seems to be lost. I am looking for the steps to also move the customization. I thought they were moved with all the files I copied to the root directory. <Step 2> above.

  6. ITGuy
    Member
    Posted 1 year ago #

    Hi,

    Just as a follow up and to close this topic.
    My issue was with data serialization. I moved everything, but by replacing the links in the sql database, it created issues on the pages appearance once moved. I used the tool provided by:

    https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    The only thing is that doing it in the production environments is too risky.

    I basically followed these steps and worked great:

    1.- Create New Database for WordPress (Copy original and assign new user and password).
    2.- Install PHP tool available in link above (intereconectit). I used the 2.1.0 version (stable).
    3.- Run tool and replace previous Link typing full link : "http://www.xxxx.com/wp" with "http://www.xxxx.com".
    4- Copy all "/wp" files to root directory.
    5.- Edit .htaccess (RewriteBase “/”, RewriteRule “/index”, RewriteCond “/sandbox”).
    6.- Edit wp-config.php (DB_NAME, DB_USER, DB_PASSWORD, WPCACHEHOME)
    7.- Log into old WordPress /wp/wp-admin and in Settings>General> change
    WordPress Address (URL) and Site Address (URL) removing “/wp”
    8.- Log into WordPress http://www.xxxxxxxx/wp-admin (No more xxxx/wp/wp-admin).
    9.- Remove PHP tool from intereconectit (important).
    10.- Test your new site before you remove the "/wp" directory and DB.

    Hope this helps others to avoid all the pain I went through.

Topic Closed

This topic has been closed to new replies.

About this Topic