Found the answer here :
https://ww.wp.xz.cn/support/topic/browsers-trying-to-opendownload-files/
When migrating from an hosting provider to another, backup/restore operation copied cache management files useful only from the source hosting provider.
These files are located in wp-content/mu-plugins
PHP code inside looks like this :
function hooks() {
add_filter( ‘mod_rewrite_rules’, array( $this, ‘htaccess_contents’ ), 99 );
}
function htaccess_contents( $rules ) {
$handler = get_option( ‘epe_php_handler’, ‘application/x-httpd-php70s’ );
$handler = ‘AddHandler ‘ . $handler . ‘ .php’ . “\n”;
return $handler . $rules;
}
I have had the same issue.
Uninstall woocommerce and reinstall woocommerce changes nothing.
When I tried to edit a page, it inserted “AddHandler application/x-httpd-php70s” into .htaccess file which causes every url to be downloaded by the user as a php file.
Finally I desactivated plugin TinyMCE and the problem was solved for me.
(Don’t ask me why 🙂