V4.0.10 Quick App WordPress 404 Error


  • | 361 points

    When setting up new WordPress install, got 404 error using Quick app > WordPress.

    0_1550269392250_Image 006_cr.png

    • Laragon v4.0.10
    • Access to Host file is write protected.
    • Win7

    Was able to successfully install by commenting out the following code in generated wp-config.php:

    /** COMMENT OUT
    if ( !defined('WP_CLI') ) {
    define('WP_SITEURL', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']);
    define('WP_HOME', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']);
    }
    */

    Thanks!


  • administrators
    | 105416 points

    @Pancho : In Laragon, everyone tends to use Pretty Url:
    http://site.test
    or
    http://localhost/site

    They should work, so you don't need to comment out these lines.


  • | 361 points

    @leokhoa Thanks for the reply.

    My anti-virus sets the host file to read only (not a bad thing for security). I usually just go in and update the Pretty Urls by hand and meanwhile use the localhost and path.

    On Quick App > WordPress, if you go the http://localhost/site for the WP install, it will default to http://localhost/wp-admin/install.php (404 Error)

    Now, if you get clever and do the full path:
    http://localhost/site/wp-admin/install.php

    You get...

    0_1550339021509_Image 014.png

    As you can see, it's missing stuff.

    You can go all the way through the install, but you'll find that there still is a problem with the path and you'll come to other 404s.

    0_1550339839871_Image 019.png

    Is the removal of the php code in the wp-config.php going to give me some issues somewhere else?

    Thanks!

    p.s.- After installing WP with full paths, I got around the 404 problems by adding the path into the wp-config.php :

    define('WP_HOME','http://localhost/site/');
    define('WP_SITEURL','http://loccalhost/site');


  • | 332 points

    It happens due to missing file from server or not placed in the right folder, Here's the best guide about fixing WordPress 404 error: https://www.cloudways.com/blog/fix-404-error-on-wordpress/


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.