Support » Localhost Installs » theme and webpage shows up as text only on local server

  • Hello All,

    I have searched for two days now, and I could not find a similar problem anywhere. Please note, that I have the issue on the local host, not the local net. I could be doing something silly…

    1. I am using the most up-to-date CentOS 7, PHP 5.4.16 (including the gd module), Apache/2.4.6, mysql Ver 15.1 Distrib 5.5.47-MariaDB.
    2. My web root folder is /var/www
    3. WordPress is installed under /var/www/html/wpteszt
    4. The owner:group of all files and folders within /var/www/html is apache:apache, while the permissions I set to 755 and 644, respectively.

    The server is localhost, and it is the only machine I want to work on, that is, the web server itself.

    I included my wp-config.php at the end to maintain the clarity. I turned debugging on, and I have the Debug Bar plugin installed, but unfortunately it did not help me much.

    THE PROBLEM: As soon as I click on the theme customisation, the theme shows up as text only, and my Debug Bar plugin disappears as well.

    I opened More Tools -> Developer Tools -> Console in Google Chrome, where I found a bunch of messages like:

    Resource interpreted as Stylesheet but transferred with MIME type text/plain: “http://localhost/wpteszt/wp-content/plugins/debug-bar/css/debug-bar.css?ver=20120317”. themes.php: 38

    Resource interpreted as Stylesheet but transferred with MIME type text/plain: “http://localhost/wpteszt/wp-includes/js/thickbox/thickbox.css?ver=4.5.3”. themes.php: 39

    JQMIGRATE: Migrate is installed, version 1.4.1 load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.5.3:9

    What am I missing that the style sheets are mishandled apparently?

    My wp-config

    define(‘DB_NAME’, ‘wpteszt’);
    define(‘DB_USER’, ‘wpgazda’);
    define(‘DB_PASSWORD’, ‘password’);
    define(‘DB_HOST’, ‘localhost’);
    define(‘DB_CHARSET’, ‘utf8’);
    /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’, ”);

    define(‘AUTH_KEY’, ‘1G^L$9tL8+Zj<J!ng4R&>9Nk-;:2q+vDUAO2m%dV#Hz$usuC=:}zTP4SFl6J@x’);
    define(‘SECURE_AUTH_KEY’, ‘/nbx:f=>V7jKB(>25PQWUH+9,PU#?+h.-dIi.;Mx7/>.0KJV^’);
    define(‘LOGGED_IN_KEY’, ‘+g$[{PCT(!FlpN&/1*^5#^E9,j}:Kb~GcX]Jh=,QN.9B^-e_wq$[:G_nT*$* ]’);
    define(‘NONCE_KEY’, ‘H[T9>zIPBvhQMI/QO8+rt]G5:pek]-H4,~Ot&1r-mNZ!e1H9KUhFR-7UeS@0<9‘);
    define(‘AUTH_SALT’, ‘*OnEG+f!2~!:81W7Ajfv|EkzF4Y//~/rw7@)B`ZF8j1=DI[qF[|@Xd&q3rz0:X/Q’);
    define(‘SECURE_AUTH_SALT’, ‘d35EW@!]AtywVIEVBZ=uV9MtPM[IBou=R9:MGJFndV^prEdX/Z5a*w(wy<Z#<k’);
    define(‘LOGGED_IN_SALT’, ‘<-Cr_3Kp2_t}Lo332 HA9zvAuKNlX3x%54>ww !}2C!<[okReh/tXfG|fa7^qQUj’);
    define(‘NONCE_SALT’, ‘ezawG)>(kbd-!WJBO3.Y:e|>oV<},r .d?v`=Z>+%x;bBJv/;sz8(,7)Uh|]>EDE’);

    $table_prefix = ‘wp_’;

    define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true );
    define(‘WP_DEBUG_DISPLAY’, true);
    //define( ‘SCRIPT_DEBUG’, true );
    //define( ‘SAVEQUERIES’, true );

    //define( ‘WP_SITEURL’, ‘http://localhost/wpteszt&#8217; );
    //define( ‘WP_HOME’, ‘http://localhost/wpteszt&#8217; );

    /* That’s all, stop editing! Happy blogging. */

    /** Absolute path to the WordPress directory. */
    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . ‘wp-settings.php’);

    Thanks for your help in advance,

Viewing 1 replies (of 1 total)
  • Well, this was exhausting.
    The cause of the problem was a link

    /etc/mime.types -> /etc/

    instead of an actual file. I did that myself, because I found that my original /etc/mime.types file did not have a

    text/css css

    line, and I did want to be able to switch between the updated and original more elegantly. (Paranoia of keeping track of all changes…)
    Once I made an actual /etc/mime.types file with the text/css css line appended, and I restarted the Apache web server with

    httpd -k stop
    httpd -k start

    my pain went away. The

    httpd -k restart

    did not give me the same result, for some reason. Odd.

Viewing 1 replies (of 1 total)
  • The topic ‘theme and webpage shows up as text only on local server’ is closed to new replies.