PROBLEM: [Magento Error] Most of the tables in database are missing and that includes all of the sales. Moreover, when someone makes an order, it is recorded inside the admin section but there is no record within the database.
Using Database Repair Tool: The Database Repair Tool compares 2 databases and updates the target database so it has the same structure as the reference database.
Create a file 503.php in your Magento installation root:
<?php header('HTTP/1.1 503 Service Unavailable'); header('Content-Type: text/plain; charset=UTF-8'); echo "503 Service Unavailable"; ?>
In .htaccess file rewrite rule:
Rewrite Engine On
RewriteCond %(REMOTE_ADDR) !^127\.0\.0\.1$
RewriteRule !503.php$ /503.php [L]
- Download the repair tool from: https://web.archive.org/web/20150414035628/http://www.magentocommerce.com/download
- Uncompress the archive.
- Putting the magento-db-repair-tool-1.0.php into any folder on your server
- Backup your existing database to have ability to restore it if anything goes wrong
- Clone it as new database on the same server. Let’s call it “database2”
- Create an empty database (”database3”)
- Copy your entire Magento folder (without cache and sessions) into a new one and install it to “database3” (By editing local.xml with credentials for the newly created “database3”); or if you already restricted access to your Magento instance, you may just change your database credentials into “database3”, clean cache and launch Magento once: it will be installed automatically.
- Backup current database to database2.
- Run http://yourdomain/pathtofolder/magento-db-repair-tool-1.0.php
- Fill in the information as the followings:
Press Continue button to complete.
We have shown you how to fix the Magento error: Missing all sale tables but sale orders are recorded. If you have any difficulties when follow our instruction, be free to leave the comment below.