.htaccess question

Does anyone have wordpress in a folder with the index.php file in the root? Having trouble after a site restore and would like to see what the .htaccess in the wordpress folder and the one in the root should look like.

  • flojnel

    Hi Milan,

    One of my sites - http://www.gondolaromantica.com/ - ran into major difficulties after a WordPress update. WordPress is in the folder "wordpress", with only the index file in the root. There's a php application that runs the registration process on the site, so that was the best way to keep them separate.

    After the update the site was either slow or not running at all and chewing up CPU. I restored twice from host's backups (Siteground) and still had issues. I asked them to do a restore for me, they did and it ran well, but they had it running as http://www.gondolaromantica.com/wordpress for testing purposes.

    I asked them to get it back to http://www.gondolaromantica.com and it didn't run after that. So I went in and tried to fix it. In the database put the site_url to http://gondolaromantica.com/wordpress and left the .htaccess in the wordpress folder the same as the codex shows, but changed the .htaccess in the root to:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    # END WordPress

    The site seems to work with one exception - some of the font awesome icons aren't showing up well.

    What I'm wondering is even though this setup seems to work, have I done something non-standard that will cause issues down the line?

    I have to say I don't want to do a lot of testing right now. The client needs the site to run now as his business is seasonal and this is the busiest part of his season. So I probably won't test it until after next week. Just trying to collect info right now.

    Of course the index.php file in the root shows that the application is in the 'wordpress' folder:
    * 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__ ) . '/wordpress/wp-blog-header.php' );

  • Adam Czajczyk

    Hello flojnel!

    I'll be happy to take a closer look at your site when it becomes less busy (I understand it's now important to keep it running at any cost rather than keep testing) so just let me know please when you're ready.

    Meanwhile, you may want to read this article:


    It's a description of this very setup and I think it may be helpful in diagnosing the issue.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.