Wordpress-free files in the wordpress installation directory

I installed wordpress in the root directory. There is a say test.html file in the same directory. I can not open this file www.mysiet.com/test.html with this url. When I open this file, I get "No Messages". (I myself coded a Wordpress template, and this message is in index.php if no messages are found). so my questions are:

  • How can I open an html file that is placed in the root directory.

  • Is it possible to create a new folder in the root directory and install another Wordpress site in this directory, while WordPress is already installed in the root directory.

  • Can I create a new folder in the root directory (in which Wordpress is already installed) and put some files in this new directory and access them through my browser.

thanks

+4
source share
4 answers

Open your .htaccess in the root folder, which after opening 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 it above everything and put your directory in the specified location "replace with the name of the subdirectory" you can add as many subscribers as you want

 <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>` 

The final result should look like if my subdirectory was named different

 <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` 
+7
source

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 saved in www / test.html, right?

If I am on the way, then the problem is when you configured this, you would tell him to use the wordpress directory. The best solution is to either move this file to the www / wordpress directory, or to its own directory from this, so you can have www / wordpress / test.html or www / wordpress / tests / test.html.

To question 2, I think you are asking if you can do something like www / wordpress / with the wordpress site, and then www / wordpress / wordpress2 / with another site. While this is possible, this is not a good idea, why do you want to do this? You must have www / wordpress / and www / wordpress2 /. If the sites are somehow connected, you should look into wordpress mu, which is a multi-level site that will allow you to run many sites from the same installation.

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

0
source

You may need to change your .htaccess rules if you want to have access to html files when installing Wordpress.

0
source

You can check the file resolution.

-1
source

All Articles