Messed Up Drupal Site, truncated all cache, menu_router, registry_file and now I can't access site After disabling comment module, I could not access some modules, so I researched how to get that fixed and end up following this. I cleared all the cache_table, menu_router and registry_file. 

This is the exact command I ran:

TRUNCATE `cache`;
TRUNCATE `cache_block`;
TRUNCATE `cache_bootstrap`;
TRUNCATE `cache_entity_og_membership`;
TRUNCATE `cache_entity_og_membership_type`;
TRUNCATE `cache_field`;
TRUNCATE `cache_filter`;
TRUNCATE `cache_form`;
TRUNCATE `cache_image`;
TRUNCATE `cache_libraries`;
TRUNCATE `cache_menu`;
TRUNCATE `cache_metatag`;
TRUNCATE `cache_page`;
TRUNCATE `cache_path`;
TRUNCATE `cache_token`;
TRUNCATE `cache_update`;
TRUNCATE `cache_variable`;
TRUNCATE `cache_views`;
TRUNCATE `cache_views_data`;
TRUNCATE `menu_router`;
TRUNCATE `registry_file`;


Now I have an empty site, I can't browse or go to anywhere. Even the front page Gives page not found error saying "/" not found.

I tried to rebuild the menu and registry with these commands but it didn't work.

chdir('path/to/site/root');
define('DRUPAL_ROOT', getcwd());
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

registry_rebuild();
menu_rebuild();


I tried with drush using drush cc all but it says 


  No Drupal site found, only 'drush' cache was cleared.
  but drush status shows it find the site


 Drupal version         :  7.23
 PHP executable         :  /usr/bin/php
 PHP configuration      :  /etc/php5/cli/php.ini
 PHP OS                 :  Linux
 Drush version          :  7.0-dev
 Drush temp directory   :  /tmp
 Drush configuration    :
 Drush alias files      :
 Drupal root            :  /path/to/site/root


What can I do? How to get the site back after this?
Best thing is to restore it from a backup to make it work.

If you want to fix it, replicate the site from a back up (db and files).
Then truncate tables one by one to see which one is causing the problem (It should be menu_router).

Truncate first all cache table and check
Truncate menu_router and check
Truncate registry_file and check.

About the code you did, try to remove registry_rebuild from your code.
Create a file fix.php and paste this code

&lt;?php
error_reporting(E_ALL);
define('DRUPAL_ROOT', getcwd());
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

menu_rebuild();


save it into your drupal root and visit mysite.com/fix.php .