• I try to install and use wordpress on my localhost.

    I followed these instructions (https://ubuntu.com/tutorials/install-and-configure-wordpress#2-install-dependencies) and did it several times everything seems to be correct but something is wrong:

    https://localhost/ returns in the browser:

    <?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 __DIR__ . '/wp-blog-header.php';
Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Do you have PHP installed and active?

    Thread Starter ashop59

    (@ashop59)

    apparently if I have php active because the php –version command returns the following:

    PHP 7.4.3 (cli) (built: Aug 17 2022 13:29:56) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    But did you active either php-fpm or mod_php? Apache needs to be able to run PHP.

    Make this file, “test.php” and put it in the root of your site:

    <?php phpinfo(); ?>

    What happens when you go to https://localhost/test.php?

    Thread Starter ashop59

    (@ashop59)

    I will check it, thank you very much

    • This reply was modified 2 years, 6 months ago by ashop59.
    Thread Starter ashop59

    (@ashop59)

    I did it and in the same way I find the line written:

    <?php phpinfo(); ?>

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Then you do not have a WordPress problem. You do not have PHP installed for your web server correctly. I suggest you contact one of the many ubuntu support groups for assistance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘localhost imprime el archivo de texto en lugar de la pagina web de wordpress’ is closed to new replies.