• Resolved lotharkoch

    (@lotharkoch)


    Hello,

    I restored a backup of a multisite (basically only one site yet) to my local system (MAMP). When opening, the browser instead of showing the website, it only shows the html source code. (Mac Chrome, Safari) Firefox instead of showing the site offers to download it.
    When i save this file as index.html into the root directory of the website, the browser kind of shows it correctly! (Some plugins then are not working)

    Have you any idea? If you want i can send you the archive!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Cory Lamle

    (@corylamleorg)

    Hey @lotharkoch,

    If you just seeing plain text/code on the screen the simple fix most of the time is to open the httpd.conf or .htaccess file and add the following lines:

    AddType application/x-httpd-php .php .htm .html
    AddHandler x-httpd-php .php .htm .html

    It will be different on your setup so whatever platform your using XAMPP/MAMP/SUSE etc. along with the term AddType php and there should be some posts that explain exactly how to set it up.

    Hope this help~

    Thread Starter lotharkoch

    (@lotharkoch)

    Hey Cory,
    thank you very much for your quick and helpful response!

    I’m using MAMP. Adding those two lines to the apache httpd.conf (and restarting the server) did’nt have any effect for me.

    Adding those two lines to the .htaccess of the WP installation, didn’t help either. It then offers me to download the page immediatly, even in Chrome. (Same in FireFox, Safari and Edge on Windows)

    As i said, when downloading the file as index.html (and storing it at the root of WP), the webserver interprets the page as a website (html) and renders it correctly. But the same happens, if i save it as index.php! So it apparently it’s not an issue of interpreting php!

    I experience the same behavior when restoring/migrating a backup with the “WP Migrate DB” plugin. Text/code instead of rendered website! (WP Migrate DB only transfers the DB.)

    BUT i do NOT experience this behavior, when restoring/migrating with the “UpdraftPlus” plugin.

    You certainly now both plugins. Maybe this additional information helps?

    I appreciate your help a lot! And i could supply you with my backup files, if you want. Just let me know!

    Have a nice day!
    Lothar

    Cory Lamle

    (@corylamleorg)

    Hey Lothar,

    If you want to submit a support ticket for this issue I can have a closer look at your setup. Please provide a link to this thread when submitting the ticket so I’ll have some context…

    Cheers~

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML source code after restoring backup’ is closed to new replies.