• EveVaterlaus

    (@evevaterlaus)


    I have a site in a subdirectory, ready to move to the root url.

    I changed the address in general settings, copied the index.php and .htaccess, edited the .index.php

    But it does not work and I have lost access to the dashboard to continue the process. Please help me! Thank you very much.
    Eve

    backticks
    <?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( dirname( __FILE__ ) . ‘/new/wp-blog-header.php’ );

    backticks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter EveVaterlaus

    (@evevaterlaus)

    https://www.seventhmoonhomebirth.com/new
    https://www.seventhmoonhomebirth.com

    are the subdirectory and root addresses. Was perfect in /new before I tried to redirect.

    Thanks again, and please help. I have done this before successfully, don’t know how I failed this time.

    Thread Starter EveVaterlaus

    (@evevaterlaus)

    OK, I fixed it. For future readers, I went into the functions.php
    following this direction”
    I<f you have access to the site via FTP, then this method will help you quickly get a site back up and running, if you changed those values incorrectly.

    1. FTP to the site, and get a copy of the active theme’s functions.php file. You’re going to edit it in a simple text editor and upload it back to the site.

    2. Add these two lines to the file, immediately after the initial “<?php” line.

    update_option( 'siteurl', 'https://example.com' );
    update_option( 'home', 'https://example.com' );

    Use your own URL instead of example.com, obviously.

    3. Upload the file back to your site, in the same location. FileZilla offers a handy “edit file” function to do all of the above rapidly; if you can use that, do so.

    4. Load the login or admin page a couple of times. The site should come back up.

    then I was back in the dashboard.
    For future reference, I think my mistake was to upload the edited .index php and the .htaccess files into the root folder BEFORE i had saved the new address in settings.

    Go step by step!!

    Eve

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Serving from subdirectory’ is closed to new replies.