Wordpress url http://localhost:17486/ shows php code instead of webpageRSS

1 reply

Last post Jun 14, 2017 03:26 AM by Yuk Ding

  • Wordpress url http://localhost:17486/ shows php code instead of webpage

    Jun 13, 2017 08:05 PM|nehas2616|LINK

    Hi,

    I am new to wordpress and  i followed link to install Wordpress on windows 10 Pro with Microsoft WebMatrix.

    Installation went well and when i try to open this url which shows under sites it is showing php code as below:-

    <?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' );

    Please let me know things to check if I am missing anything though I have googled a lot and not able to figure out yet.


  • Re: Wordpress url http://localhost:17486/ shows php code instead of webpage

    Jun 14, 2017 03:26 AM|Yuk Ding|LINK

    Hi nehas2616,

    It seems that the IIS express recognize the .php file as text/pkain instead of a php file.

    Webmatrix use IIS express instead of IIS by default, so please check whether PHP for IIS express has been installed in web platform installer. Then hen you open the PHP site, it should detect the PHP automatically. You could also go to webmatix->open site->site tab->settings enable PHP->select the PHP version.

    You could set wordpress by following this link:

    https://codex.wordpress.org/Installing_on_Microsoft_IIS

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.