Wordpress - Moved WordPress to New Server, Now Tries to Download a File

I guess you haven't taken a look at the file that is served for downloading, if so you would have seen this:

<?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( dirname( __FILE__ ) . '/wp-blog-header.php' );

Which could have been easily identified as the content of the index.php file inside the root of your WordPress installation.

Regarding the cause(s) for this behavior, check if you are having the correct file permissions, make sure your htaccess file is correct. Besides that some other hosting related settings could be incorrect, see Codex: Hosting WordPress (not very informative though) or on here What are best practices for configuring a server for Wordpress sites?.

The above should get you started. I actually pretty much did have to make a - somewhat educated - guess about the reason(s), so inspect that deeper yourself, but I'm fairly certain the origins are in the general area that I addressed.


Simple steps

1 - Go to filemanager through cpanel or FTP

2 - Delete the .htaccess (make sure you have created a backup)

3 - Open your website and set the permalinks it will create a new .htaccess file .

4 - Enjoy!

I just deleted .htaccess file and it is working perfectly now :)