database – Problem migrating to localhost


Hey guys 🙂 I have to following case. I was given a WP site for “fixing”. The website is huge in size. It’s around 3GB and the DB is around 350MB. Most of the DB size is coming from postmeta table that is around 200MB. So I want to migrate the site on my localhost and try to reduce the DB size and to implement a custom function. Since the size of the site is huge, Duplicator is not working so I had to manually migrate it by downloading the files via FTP and using phpMyAdmin I exported the database. I’m using WAMP on my PC, so I copied the files to my wamp64/www folder, created a new database and imported the copy of the database, I edited the wp_config.php file, I changed the site url from the wp_options table and also using wp_config, I deleted the .htaccess file and after all of this, when I try to load the site using “http://localhost/mySite” or simply “localhost/mySite”, the site is not loading and instead I’m prompted to download a file called “download” (no file extension) that contains the same code as the index.php. The /wp-admin directory is also not accessible.. Renamed all plugins and active themes by adding “old” so it will deactivate them, but still no luck.. I’m out of ideas here honestly.. I reached page 7 from the Google results and still no fix of the problem.. 🙁 Any ideas, please? 🙂 Thanks!

Here is the content of the file it downloads:

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );

/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';