WordPress.org

Forums

This file doesn't do anything, but loads (2 posts)

  1. pavel.skovajsa
    Member
    Posted 1 year ago #

    Hello,

    I installed WordPress on a fresh Debian server from Debian package and somehow I cannot get it to work correctly. I have this in my apache configuration:

    host:/etc/apache2/sites-available$ cat wordpress
    ## Virtual host VirtualDocumentRoot
    NameVirtualHost *:80
    <VirtualHost *:80>
      ServerName www.examplesite.com
      UseCanonicalName Off
      VirtualDocumentRoot /usr/share/wordpress
      Options All
    
     # wp-content in /srv/www/wp-content/$0
     RewriteEngine On
     RewriteRule ^/wp-content/(.*)$ /srv/www/wp-content/%{HTTP_HOST}/$1
    </VirtualHost>

    Which apparently works fine, since I reach the site, just that the only reponse I get using a browser is this:

    <?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('./wp-blog-header.php');

    Any ideas what am I doing wrong?

  2. bemdesign
    Member
    Posted 1 year ago #

    Is PHP installed and configured correctly? Because if you're seeing what you posted in that 2nd block, it means PHP isn't installed or configured correctly and your server is serving up PHP files as text to your browser!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.