Background: I uninstalled a WAMPserver (version 2.5) on a PC, which left over a WordPress installation with only .frm and .ibd and .opt files. That's it. I need to restore the site.

My latest attempt to restore the site is based on a method I read at this link, where:

  1. I install a fresh installation of WAMP (version 3 this time)
  2. I install a WAMP add-on of MySQL 5.6.12, which is the version of MySQL that my site was running on before my WAMP failure.
  3. Install WordPress as a fresh new install.
  4. Copy all the .ibd, .opt, and .frm files left over from the old setup, and replace the fresh .ibd, .opt, and .frm files in the new setup.
  5. Go into PHPAdmin, access the database and run "alter table" comments for each wordpress table (ex.: alter table wp_posts import tablespace;)

I copied the left over .ibd, .opt, and .frm files from the old setup, and then went over to the new database folder and was surprised to find that there were not .ibd files in there to replace but .myd and .myi files instead!

I find this confusing because I learned that I had to have the same version of MySQL running to attempt this.

My questions are this:

1) why did my new installation create dual .myd and .myi files for each database table instead of single .ibd files?

2) am I able to replace the files anyway, with the hopes of having the new setup read the old .ibd files and working them into the new .myi and .myd files

3) is there no hope of restoring this site now? This would appear to be my last hope before I'd have to resort to copying the paragraphs out of the .ibd files using TextWrangler to convert them into a text file in order to at least get my content back in some form.

1 Answer 1


.myd and .myi files are the data and index files for MyISAM database engines. There is nothing wrong with them being there. They won't affect in any way your Innodb files that you are copying. They don't have to be overwritten if you copy the files into the folder.

In my installation of wampserver the MyISAM files (myd and myi) are one folder deeper than the ibdata1 file. That folder name should be the name of your database. If its not there then create the folder with the database name.

Copy the data that you have over. This probably won't worth without ibdata, but just in case, after copying the other files into the appropriately named folder, click the wamp icon in the bottom right of the screen and select my.ini. Add the line:

innodb_force_recovery = 1

Restart wamp server. Let me know if your database is able to actually get anything out of the files you copied over.

  • That's the problem. I don't have the ibdata files. When I uninstalled WAMP, it took the ibdata file away. Frustrating that it would only leave the .ibd and .frm files with the .opt file. My method is to create a new WordPress installation with all the proper files for MySQL including ibdata. Then I would replace the newly created .frm files and .ibd files with the old ones from the previous installation, run queries in PHPMyAdmin to reconnect the tables. My problem is that the new installation put .myd and .myi files in there instead of .ibd. That was totally unexpected in my attempt. Nov 29, 2016 at 1:43
  • Maybe your fresh installation of wordpress uses MyISAM instead of Innodb. It's a little strange because Innodb is the more modern of the two database engines. I updated the my answer. If you decide to try it, let me know if it works. Nov 29, 2016 at 2:56
  • Thanks. I'll give it a try. I do appreciate you giving me some direction that implies it could possibly work. A question: after I attempt this, would I need to remove the "innodb_force_recovery = 1" from the my.ini file? Nov 29, 2016 at 3:22
  • I copied all the .frm and .ibd files and put them in the new database folder, and allowed the .frm files to overwrite the .frm files in the new database folder. This left .ibd, .myi, and .myd files in the same folder. I then added that line to the my.ini file that was located in MySQL from the WAMP button menu. When I tried to access localhost/wordpress it said "Unable to Establish a Database Connection". My next question is: was the force recovery supposed to make the connections in the database, or was I supposed to start running the SQL queries I mentioned in PHPMyAdmin? Nov 29, 2016 at 3:50
  • I went ahead and tried doing queries. I didn't get any results. For example: Error SQL query: alter table wp_comments import tablespace MySQL said: Documentation #1146 - Table 'wordpress.wp_comments' doesn't exist Nov 29, 2016 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.