non-wordpress files in wordpress installation directory

I have installed wordpress in root directory. There is a file say test.html in same directory. I can not open this file www.mysiet.com/test.html with this url. When i open this file i get ‘No posts found’.(I have coded wordpress’s template on my own and this message is in index.php if no posts found). so my questions are:

  1. How can i open an html file that is placed in root directory.

    Read More
  2. Can i create a new folder in root directory and install another wordpress site in that directory while root directory already have a wordpress installation.

  3. Can i create a new folder in root directory (that already has wordpress installed in it) and place some files in that new directory and access them via my browser.

Thanks

Related posts

Leave a Reply

4 comments

  1. Open your .htaccess in the root folder which once opened should look something like this

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress`
    

    Then add this above all of that and place your directory in designated spot “replace
    with subdirectory name” you can add as many subs as you like

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/REPLACE WITH SUB DIRECTORY NAME/(.*)$ [OR]
    RewriteCond %{REQUEST_URI} ^/REPLACE WITH SECOND SUBDIRECTORY NAME/(.*)$ [OR]
    RewriteRule ^.*$ - [L]
    </IfModule>`
    

    Final Result should look like this if my subdirectory was named other

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/other/(.*)$ [OR]
    RewriteRule ^.*$ - [L]
    </IfModule>
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress`
    
  2. If I understand this you have wordpress installed on your server in its own folder, something like www/wordpress/. You also have a *.html file stored in www/test.html correct?

    If I’m on track, then the issue is when you configured this you would have told it to use the wordpress directory. The best solution is to either move that file into the www/wordpress directory or into its own directory off that one, so you could have www/wordpress/test.html or www/wordpress/tests/test.html.

    For question 2 I think what you are asking is can you do something like www/wordpress/ having a wordpress site, but then www/wordpress/wordpress2/ having another site. Though this is possible it isn’t the best idea, why would you want to do this? You should have www/wordpress/ and www/wordpress2/. If the sites are connected in some way, you should look into wordpress mu, which is a multi site, which will allow you to run many sites all from the same installation.

    Question 3 was answered above but yes you can do something like www/wordpress/tests/test.html.