Title: WordPress Subfolder Issues
Last modified: August 30, 2016

---

# WordPress Subfolder Issues

 *  [rob.goldstein13](https://wordpress.org/support/users/robgoldstein13/)
 * (@robgoldstein13)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wordpress-subfolder-issues/)
 * Hi, I just uploaded the wordpress files to mydomain.com/staging subfolder. And
   I added a .htaccess file in the /staging subfolder that contains the following:
 *     ```
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
       ```
   
 * But when I go to mydomain.com/staging, I get the directory listing. And when 
   I actually go to wp-login.php, it is not styled. Looking at the <link> tags it
   looks like the styles are trying to pull from mydomain.com instead of mydomain.
   com/staging.
 * How do I fix this, so when I go to mydomain.com/staging I get a normal wordpress
   site?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Anusha Janga](https://wordpress.org/support/users/anusha-janga/)
 * (@anusha-janga)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wordpress-subfolder-issues/#post-6266115)
 * Hi,
 * We have to change the urls after moving the site to subfolder.
    Run the below
   queries in database. UPDATE wp_options SET option_value = replace(option_value,‘
   [http://www.oldsiteurl.com&#8217](http://www.oldsiteurl.com&#8217);, ‘[http://www.newsiteurl.com&#8217](http://www.newsiteurl.com&#8217);)
   WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
 *  UPDATE wp_posts SET guid = REPLACE (guid, ‘[http://www.oldsiteurl.com&#8217](http://www.oldsiteurl.com&#8217);,‘
   [http://www.newsiteurl.com&#8217](http://www.newsiteurl.com&#8217););
 *  UPDATE wp_posts SET post_content = REPLACE (post_content, ‘[http://www.oldsiteurl.com&#8217](http://www.oldsiteurl.com&#8217);,‘
   [http://www.newsiteurl.com&#8217](http://www.newsiteurl.com&#8217););
 * Thanks,
    Anusha.
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wordpress-subfolder-issues/#post-6266118)
 * Delete that `.htaccess` file and you should be able to go ahead with the normal
   installation. After you get the installation done, set the permalins in the admin
   area, and that will generate the `.htaccess` file for you, and this will make
   sure that it’s right for that sub-folder.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WordPress Subfolder Issues’ is closed to new replies.

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [installation](https://wordpress.org/support/topic-tag/installation/)
 * [style](https://wordpress.org/support/topic-tag/style/)
 * [subfolder](https://wordpress.org/support/topic-tag/subfolder/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/wordpress-subfolder-issues/#post-6266118)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
