• I had a WHM, Linux server crash. I managed to get ssh access but WHM was lost. This could be due to a Mysql failure, I cannot reinstall and restart mysql using ssh.

    I set up a new site and installed WP using the the wp tool on cPanel. I created db and wp and db user all named identical to the old site. I had a .sql export of the db from the old site. I got that into the new site mysql db.

    The set up tool gave a random prefix to all the tables even though I specified wp_ in the set up. The old tables from the back up came into the new db just like they were supposed to, even though the new random prefix tables all show up in the db.

    I also had a backup copies of wp_admin, content and includes that I put in the new public_html. I got the new installation to see my themes. I can see all the data in the db. What I don’t know how to do is connect the new installation controls to the rest of the elements of the old site like pages and menu items. I can see all the downloaded photos in folders but they don’t show up in Galery in the dashboard.

    I feel like I’m getting close to having the old site back but there are a few things I don’t quite get.

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Did you check what the $table_prefix is in your wp-config.php file? That might be causing the automatic prefix name change in your database.

    Thread Starter funbooker

    (@funbooker)

    Thanks for the response. I did check that prefix setting and it’s wp_

    Moderator threadi

    (@threadi)

    Do I understand correctly: you already have access to the backend of the new installation? And you can also see the data records of the old website there, only the images are not displayed? In addition to the SQL dump, you also need a backup of the wp-content directory – which contains these files, among others.

    Thread Starter funbooker

    (@funbooker)

    I have placed a copy of the old wp-content in the public_html directory and there’s no indication the act of copying and pasting it there has had any negative effects on the web site. It didn’t crash or become unable to be reached. All the appropriate data from the old site seems to be in wp-content.

    I suspect there is some code somewhere that was created when the new site was created that creates relations or links to the necessary elements to display the old pages and the old comments and to display the various page elements in the dashboard in tabs that are supposed to be linked to elements like Media, Comments and Pages. I can’t see any of the things I know are in the db or uploads folder or wp-content folder.

    • This reply was modified 1 year, 2 months ago by funbooker.

    Hello @funbooker
    You can do this things
    1. Clear your new installation DB first.
    2. Import your old .sql file.
    3. Check DB prefix in the old .sql file.
    4. Add proper credentials in your wp-config.php file.
    5. If you are using temporary url then store that in your DB’s wp_options table.
    6. Run your website and do search and replace.
    Thank you

    Moderator threadi

    (@threadi)

    What about

    And you can also see the data records of the old website there, only the images are not displayed?

    ? Regarding the wp-admin.

    Thread Starter funbooker

    (@funbooker)

    I suspect the solution to my problem lies somewhere in wp-admin, maybe in the includes directory, but I really don’t know what to look for or do when I go to that directory.

    Thread Starter funbooker

    (@funbooker)

    Well, I followed Shubham’s advice about emptying the db and re-importing the .sql file. That returned the db to the state before I deleted the data, the wrong prefix was inserted. I checked a few things and got my site back. It’s visible to the public and looks the same as it did on the old server.

    It also has a problem I had before the old server crashed. I can log in to the admin user account. But here’s the big problem I could not solve with the old installation. When I’m logged in as user, I don’t get admin controls, no dashboard. I see Howdy Admin on the right hand side of the black bar at the top but no drop down on the left side that gives me the option of selecting Dashboard or Visit Site, etc.

    Moderator threadi

    (@threadi)

    Then you are either not logged in with an administrator or the authorizations are broken.

    There is a plugin for the latter case, but the best you could do is install and activate it via WP CLI: https://ww.wp.xz.cn/plugins/reset-roles-and-capabilities/

    Alternatives to this are described here: https://wordpress.stackexchange.com/questions/105241/reset-default-roles-and-capabilities

    Alternatively, you would have to reset the permissions yourself in the database. This is described here, for example: https://wordpress.stackexchange.com/questions/40944/how-can-i-restore-admin-capabilities

    Please note that after this reset, no matter which way you use, you should deactivate and reactivate all plugins again, as some of them set their own permissions that are removed by the reset.

    Thread Starter funbooker

    (@funbooker)

    I won’t get to try these things until tomorrow. I’m thinking the plug in is’t going to work because I don’t have access to admin controls. I’ll try the others though. Thanks for taking the time to send these suggestions.

    Thread Starter funbooker

    (@funbooker)

    I tried all of that stuff. I couldn’t get the sql queries to run. I think they’re incomplete somehow and I don’t know what to add.

    So I still can’t get any admin capabilities when I log in as admin. It just looks like a regular user with no admin permissions is logged in. I get no admin controls.

    Moderator threadi

    (@threadi)

    Then I would recommend that you find someone who can look at it with you. If your hoster’s support can’t do this, you might be able to find someone here: https://jobs.wordpress.net

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

The topic ‘Migrating wp site without transfer tool’ is closed to new replies.