Support » Fixing WordPress » setting up wordpress on a subdirectory

  • Resolved siawacsh


    Hello, I have been struggling with implementing a security feature as per your link referred to from the WordPress dashboard settings. I am a novice and steep learning curve. So please bear with me.

    I have installed WP on a subdirectory /hide

    But want the outside world to see my site as

    Another words, the regular users would just type to log on to my site. But my WordPress is hidden in subdirectory /hide.

    According to the wordpress tutorial, all I have to do is go my dashboard and set “site address” (URL) to and “WordPress Address” (URL) to

    Then I edit the following line in index.php stored within /hide to


    I then copy this file over from /hide to the root directory on the server.

    I have done this. But I cannot view my site when I type I keep getting

    Error establishing a database connection

    However, when I type in I get


    Just another WordPress site

    This is somewhat embarrassing, isn’t it?
    It seems we can’t find what you’re looking for. Perhaps searching can help.

    I can also login to the back end of which works fine.

    I also notice that when I download WP on to my local drive I get the following file structure in descending order.

    1. WordPress (which I created as the root prior to downloading using FileZilla)

    2. Folders on one level: /hide >>> WordPress >>> WP-admin >>> WP-content >>> WP-includes: and file index.php

    To reiterate, this is the structure I downloaded from the server unaltered. within the /hide folder there is another index.php file but with the default code:


    I would like to know is the correct file structure. I would also like to know if for each different site I create I should create different folder on my local drive and copy WP into it. I expected FileZilla would create this according to the site name by default. But it does not do this.

    This is an important feature. Please let me know what step I am doing wrong to correct this.

    Siavash Sefidvash

Viewing 11 replies - 1 through 11 (of 11 total)
  • Are you running WordPress on a Windows (IIS) server?

    No, Bluehost uses Linux.

    Try adding this to your wp-config.php file:


    Hello Patrick,

    I tried your amendment as I understood it. I am including my config file for you to check.
    I am assuming that this file is to be placed in the subdirectory /hide.

    But unfortunately has not worked.

    I have edited out the lines where my password and database login are meant to go.

    Please amend and let me know.

    Many thanks in advance


     * The base configurations of the WordPress.
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information
     * by visiting {@link Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     * @package WordPress
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'concenu6_innercircle');
    /** MySQL database username */
    define('DB_USER', 'username');
    /** MySQL database password */
    define('DB_PASSWORD', 'password');
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
     * Authentication Unique Keys and Salts.
     * Change these to different unique phrases!
     * You can generate these using the {@link secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.

    It seems to work just fine on my end. Please check again.

    Yes indeed, it works now. Don’t know how to thank you enough.

    All the best to you!


    Awesome, glad to help 🙂 Please go ahead and mark this topic as resolved.

    Thank you!

    Hi Patrick, I forgot to ask one thing. As you saw this website is empty at the moment. So there are no .htaccess file.

    From some of the WP documentation I read that if I am using fancy permalinks then the hidden .htaccess file must also be updated. But the documentation was not clear as to what should be done with it.

    I would like to know this for the future.



    Your fancy permalinks are working fine right now so don’t worry about changing anything in your .htaccess file. In general, you shouldn’t edit this file unless there’s an issue or you have specific rules to add (and know what you are doing).

    Thanks for the reply. But if that is the case I don’t understand why .htaccess file was mentioned in the WP tutorial at all.

    I just figured all the ground work should be done now while my site is still empty, rather than do it after I have a fully functional site.


Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘setting up wordpress on a subdirectory’ is closed to new replies.