Title: Serving from subdirectory
Last modified: August 31, 2016

---

# Serving from subdirectory

 *  [EveVaterlaus](https://wordpress.org/support/users/evevaterlaus/)
 * (@evevaterlaus)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/serving-from-subdirectory/)
 * 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](https://wordpress.org/support/users/package/) 
   WordPress */
 * /**
    * Tells WordPress to load the WordPress theme and output it. * * [@var](https://wordpress.org/support/users/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](https://wordpress.org/support/users/evevaterlaus/)
 * (@evevaterlaus)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/serving-from-subdirectory/#post-7167449)
 * [http://www.seventhmoonhomebirth.com/new](http://www.seventhmoonhomebirth.com/new)
   
   [http://www.seventhmoonhomebirth.com](http://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](https://wordpress.org/support/users/evevaterlaus/)
 * (@evevaterlaus)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/serving-from-subdirectory/#post-7167461)
 * 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', 'http://example.com' );
       update_option( 'home', 'http://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.

## Tags

 * [Install](https://wordpress.org/support/topic-tag/install/)
 * [lost](https://wordpress.org/support/topic-tag/lost/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)
 * [root](https://wordpress.org/support/topic-tag/root/)
 * [subdirectory](https://wordpress.org/support/topic-tag/subdirectory/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [EveVaterlaus](https://wordpress.org/support/users/evevaterlaus/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/serving-from-subdirectory/#post-7167461)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
