Title: move WP database using MyPhp import ?
Last modified: August 20, 2016

---

# move WP database using MyPhp import ?

 *  [amadeus39](https://wordpress.org/support/users/amadeus39/)
 * (@amadeus39)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/)
 * I have a WP blog installed in a subdirectory of my website and would like to 
   move it to the root directory.
 * I did a fresh WP install in my root directory, and then imported the original
   database to my new one thru cPanel/MyPhp (backed up the original and then imported
   the backed up file into my new DB).
 * That seemed to go o.k., at least from appearances. I now have the same blog in
   two locations within the same domain — now in both the root and the original 
   subdirectory (I put a dummy post in one so I can tell the two apart.)
 * My problem now is that when I try to log into what should be my new wp-admin 
   dashboard, my login keeps getting redirected to the original subdirectory. IOW
   I can’t access wp-admin for the new install.
 * What have I overlooked ? Thanks for any pointers.

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [candell](https://wordpress.org/support/users/candell/)
 * (@candell)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969437)
 * You need to do a find and replace on your old url, replacing with your new url.
 * for example find all instances of
 * [http://www.yourwebsite.com/subdirectory/](http://www.yourwebsite.com/subdirectory/)
 * with
 * [http://www.yourwebsite.com](http://www.yourwebsite.com)
 * otherwise all the links in the admin and public facing versions of your site 
   will point to the subdirectory version of your website.
 * Personally I find it easier to find/replace on the backup.sql filerather than
   in the database as you have to write find and replace sql commands.
 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969439)
 * Try setting the urls to the correct location with one of these methods:
    [http://codex.wordpress.org/Changing_The_Site_URL](http://codex.wordpress.org/Changing_The_Site_URL)
   And use a search and replace tool to replace all other instances of your old 
   url: [http://interconnectit.com/124/search-and-replace-for-wordpress-databases/](http://interconnectit.com/124/search-and-replace-for-wordpress-databases/)
 * But before you do, make a backup of your database: [http://codex.wordpress.org/Backing_Up_Your_Database](http://codex.wordpress.org/Backing_Up_Your_Database)
 *  Thread Starter [amadeus39](https://wordpress.org/support/users/amadeus39/)
 * (@amadeus39)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969570)
 * thank you candell. How do you “find/replace” on the backup.sql file ?
 *  Thread Starter [amadeus39](https://wordpress.org/support/users/amadeus39/)
 * (@amadeus39)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969576)
 * and thank you keesiemeijer. I went with your first option and added the two lines
   to the wpconfig.php file — which worked.
 * I now have access the root directory/new WP install wp-admin function. Many thanks!
 * Unrelated to my original post, and I’m happy to start a new thread, what didn’t
   get fixed were the missing tabs in my wp-admin/dashboard
 * My original WP install in a site subdirectory had a problem with missing tabs.
   It only showed Posts, Media, Comments, Tools and unusually Profile.
 * Missing were Links, Pages, Appearance, Plugin, Users, Settings
 * I thought a fix would be to do a fresh WP install in a different directory and
   then import the old database.
 * Under the fresh WP install, all the tabs were present (except Profile, which 
   I don’t think usually shows anyway). But they disappear again after the DB import.
   It seems like the DB import is bringing the problem with it.
 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969587)
 * Can you go to the plugins page by putting this after your site’s url `/wp-admin/
   plugins.php` when logged in (`www.example.com/wp-admin/plugins.php`)
 * If you can, deactivate **all** plugins to see if this resolves the problem? If
   this works, re-activate the plugins one by one until you find the problematic
   plugin(s).
 *  Thread Starter [amadeus39](https://wordpress.org/support/users/amadeus39/)
 * (@amadeus39)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969625)
 * thanks for your quick reply here keesiemeijer !
 * my original problematic URL is [http://www.example.com/blog/wp-admin](http://www.example.com/blog/wp-admin)
 * my new WP install is at [http://www.example.com/wp-admin](http://www.example.com/wp-admin)
 * following your recommendation, I logged into my original [http://www.example.com/blog/wp-admin](http://www.example.com/blog/wp-admin)
   and going to plugins.php brings back this error message :
 * “You do not have sufficient permissions to access this page.”
 * I won’t be able to test the new blog until later since I’ll have to import the
   old database again. For the newer install at [http://www.example.com](http://www.example.com)
   I reinstalled the new DB so I could verify the dashboard tabs were coming and
   going with the DB installs.
 *  Thread Starter [amadeus39](https://wordpress.org/support/users/amadeus39/)
 * (@amadeus39)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969651)
 * Hello again keesimeijer
 * An hour later from my last post, I imported the old DB into the new install, 
   and tried your recommendation, this time on the new install with the old DB imported.
 * I got the same error message : “You do not have sufficient permissions to access
   this page.” — the same as when I tried calling up [http://www.example.com/blog/wp-admin/plugins.php](http://www.example.com/blog/wp-admin/plugins.php)
   after logging into wp-admin.
 * The permissions problem seems to be traveling with the database ?
 * My goal is to get back to operating under a clean WP install with all the dashboard
   tabs showing, but also keeping the posts from the original blog, which I can’t
   access any more administratively thru the original WP install.
 * [http://a1mortgagesolutions.com](http://a1mortgagesolutions.com) (new install)
   
   [http://a1mortgagesolutions.com/blog](http://a1mortgagesolutions.com/blog) (original
   install with corrupted dashboard)
 *  Thread Starter [amadeus39](https://wordpress.org/support/users/amadeus39/)
 * (@amadeus39)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969680)
 * Keesimeijer : taking your lead, I explored a bit further. I logged into my original
   blog’s wp-admin and then went to users.php and got this message “cheating, uh?”
 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969699)
 * Try this:
 * – [resetting the plugins folder](http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F)
   by using [FTP](http://codex.wordpress.org/FTP_Clients) or whatever file management
   application your host provides. Sometimes, an apparently inactive plugin can 
   still cause problems.
 * – switching to the default theme by renaming your current theme’s folder in wp-
   content/themes using [FTP](http://codex.wordpress.org/FTP_Clients) or whatever
   file management application your host provides.
 * – re-uploading all files & folders – except the **wp-content folder** from a **
   fresh** download of WordPress. by using [FTP](http://codex.wordpress.org/FTP_Clients)
   or whatever file management application your host provides. ([manual upgrade](http://codex.wordpress.org/Updating_WordPress#Manual_Update))
 *  Thread Starter [amadeus39](https://wordpress.org/support/users/amadeus39/)
 * (@amadeus39)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969720)
 * Thank you again keesiemeijer
 * You’ve given me plenty to work thru. Much appreciated.
 * The imbedded links in your replies were very helpful and a nice touch.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘move WP database using MyPhp import ?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 3 participants
 * Last reply from: [amadeus39](https://wordpress.org/support/users/amadeus39/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/move-wp-database-using-myphp-import/#post-2969720)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
