I was having 'HTTP error' issue with media uploads. So I was referring to this post.

I was following the accepted answer and added 'AddType x-mapp-php5 .php' to .htaccess file using Yoast SEO plugin. Now I can only see PHP scripts on each page (wp-admin, wp-login).

How do I fix this? I have a backup of .htaccess file.

I see this when I open wp-admin:

 * Dashboard Administration Screen
 * @package WordPress
 * @subpackage Administration

/** Load WordPress Bootstrap */
require_once( dirname( __FILE__ ) . '/admin.php' );

/** Load WordPress dashboard API */
require_once(ABSPATH . 'wp-admin/includes/dashboard.php');


wp_enqueue_script( 'dashboard' );

if ( current_user_can( 'install_plugins' ) ) {
    wp_enqueue_script( 'plugin-install' );
    wp_enqueue_script( 'updates' );

It is something similar for each page.


When I open the site it shows a blank page and the browser downloads a file without an extension and it has following content:

 * 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' );
  • For a start, remove the AddType x-mapp-php5 .php line - that line is causing your PHP code to be exposed, since you are changing how your server treats PHP files!? I don't even see why that would be a suggestion to resolve an "HTTP Error", since presumably PHP was already "working" on your server? AddType (and AddHandler) directives are very server specific - what might work on one server, will not necessarily work on another. – MrWhite Jan 1 '18 at 16:17
  • I cannot change the file. That's the problem. I don't know it's some kind of WP optimised hosting and I don't have the access to that file. I can do that only via Yoast SEO. – knight Jan 2 '18 at 0:38
  • @MrWhite Thanks! It worked! So, probably off-topic but what can I try to resolve HTTP error? – knight Jan 2 '18 at 1:02
  • It sounds like quite a "dangerous" setup if you can't directly access that file, yet plugins can?! (Unless the plugins are also restricted?) The other thread you link to would seem to have other good suggestions regarding this problem - sorry, I can't help further with that I'm afraid. However, if this is "some kind of WP optimised hosting" then maybe the host should be the first port of call? – MrWhite Jan 2 '18 at 9:06
  • 1
    @MrWhite Yeah. I got login info. I fixed this .htaccess issue. I tried some of those methods and they seem to work fine for a while. Even host support did the same and it works for a while. Anyway, thanks! – knight Jan 3 '18 at 13:56

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.