Many Magento developers asked for help to solve the following problem: Most of the tables in the 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. If you have the same missing all sale tables problem, let’s try our suggested solution.
Solution For The Missing Sale Tables Error
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.
Preparation:
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]
Implementation:
- 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 the ability to restore it if anything goes wrong
- Clone it as a 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 the 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 following our instructions, be free to leave the comment below.