Wordpress Site Download Php File
I can't get my wordpress install live locally, i'm using wordpress, nginx, mySQL, php 7.1, ubuntu 16.04 and below is my nginx file. Briggs And Stratton Vanguard 6.5 Hp Manual. Cakephp Installation Windows 7. Install Php Apc Ubuntu Nginx Root. I just get a download file instead of the website. Server { listen 80 default_server; listen [::]:80 default_server ipv. Moved WordPress to New Server, Now Tries to Download a File. I recently moved a website and when the URL is visited, a file named 'download' with no extension and only a 1KB file size downloads automatically. Which could have been easily identified as the content of the index.php file inside the root of your WordPress.
The content type of your file should be not generic application/octet-stream, but the type of the file itself, try changing this line: header('Content-Type: application/octet-stream'); to ( $file_type is already defined in your code) header('Content-Type:'.$file_type); EDIT: Also make sure that you do not have any spaces or new lines in the source code (at the beginning of your script or at the end), because those may be included in the output. EDIT: Try to remove all header(.) lines, except: Content-Type, Content-Disposition and also add another one: header('Content-length:'.