• Resolved Hadeelayyad

    (@hadeelayyad)


    hi there,
    my website with wordpress works well in sub folder in domain and i’m trying to redirect the main index.php url to this folder
    i tried this code
    <?php
    define(‘WP_USE_THEMES’, true);

    /** Loads the WordPress Environment and Template */

    require( dirname( __FILE__ ) . ‘/wp/wp-blog-header.php’ );

    ?>

    but the website is going to get this error
    “Error establishing a database connection”

    my wordpress website works very well in mywebsite.org/wp
    and i need to let mywebsite.org to redirect to this folder /wp where to wordpress installed !!

    any help well be appreciated

    many thanks

Viewing 1 replies (of 1 total)
  • Thread Starter Hadeelayyad

    (@hadeelayyad)

    i tried this code and it works very well !

    <?php ob_start();
    header(“Location: /wp/”);

    thank you all

Viewing 1 replies (of 1 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.