hosting webapplication on wordpress website - wordpress

i have WordPress installed in the root http://ibdaa.info
what a need to do is to make sub-directory likee: http://ibdaa.info/app and upload my website to this sub-directory its contain (html,css,js)
i make try to just upload my site to previous link but it seem doesn't work

You will have to upload all the files present in the root folder of http://ibdaa.info to http://ibdaa.info/app and then change the site_url and the wordpress_url from the backend to the new url which in case is http://ibdaa.info/app and you will have to change the new url to point to the /app directory in the .htaccess file also.
A similar way would be to define constants in the wp-config.php file with the new url's
define('WP_HOME','http://ibdaa.info/app');
define('WP_SITEURL','http://ibdaa.info/app');

Related

OpenLiteSpeed WordPress VPS 404 Error on Non-Wordpress Site Install in Sub Folder

I have an OpenLiteSpeed VPS WordPress install over at Vultr, and am trying to install a non-WordPress website into a sub-folder I created.
Ex.) https://example.com/test that is pointed to a new folder I created in the WordPress root install directory of /var/www/html/test
I created the directory and placed the files needed there that include an index.php file, however when I go to https://example.com/test, I receive a 404 Not Found error. I believe it has something to do with modifying the .htaccess file in the root of my WordPress install, but am unsure of what to modify 100%.
Any help is appreciated!
I tried modifying the Rewrite rules but am not confident in the options I chose. I since reverted the .htaccess file back to my default settings in which OpenLiteSpeed defines.
This can be closed out - I have it defined in my index.php file that resides in that folder point to a database I created in phpMyAdmin and I had the database field filled out incorrectly. Thank you to everyone who replied though. Oops!

How can I ignore folder name in wordpress?

I have a local wordpress website on IP "192.168.0.115".
There is a page in it called "Invoice" ("192.168.0.115/invoice").
I have about 800 PDF (invoice) files.
I would like their URL to be "192.168.0.115/invoice/invoice001.pdf", "...002.pdf" and so on.
What I did:
I made a folder called "invoice" in the htdocs folder next to "wp-admin", "wp-content" and "wp-includes" where I put all 800 PDF files.
It worked out - when I entered the URL "192.168.0.115/invoice/invoice001.pdf" it opened the desired PDF file.
But when I entered the url "192.168.0.115/invoice" I had no longer access to the page "Invoice".
Instead I got all of the files listed as in a folder through the browser.
I couldn't access the page, because of the same folder name and same page name -> "invoice".
My question:
Is there any way I can tell wordpress to ignore the folder called "invoice" and load the page with URL "192.168.0.115/invoice" AND in the same time open files with URL "192.168.0.115/invoice/invoice001.pdf"?
If you are using apache you can add a rewrite rule to your .htaccess file.
You can't have a WordPress page and a folder named that same thing. So the first thing you need to do is change your folder name from invoice to my-invoices. Then you add this rule to your .htaccess file:
RewriteRule ^invoice/(.*).pdf$ my-invoices/$1.pdf
Don't forget to rename your folder, but leave your WordPress page slug.
Then you'll be able to go to each of these URLs:
http://192.168.0.115/invoice/
http://192.168.0.115/invoice/invoice001.pdf
Be sure to place your new rewrite rule above the ones for WordPress.

Wordpress - allow files in site root to be accessed

I have a wordress site but I have a simple page which is not part of the wordpress project
http://sitetest.com/mypage.php
How can I make wordpress ignore this file and allow it to be shown
Just upload this php file to your /public_html directory and run as usually http://sitetest.com/mypage.php, it should work.
UPD. I checked and it works for me.
Just put the file in the site root folder. It will be accessible.
Example: if your site root is /var/www/html/ or public_html then put the file in html/public_html folder where others WordPress files & folders are like wp-content, wp-includes, wp-admin etc.

Using wordpress in a subdirectory

I use to have wordpress installed on the root of the website, but today I moved to a subdirectory "root/blog" with these steps:
1) Moved all the files>
2) Copied .htaccess and index.php do "root" and modify them
3) Change the wordpress URL on the settings.
It worked fine.
But I don't want it be accessed via www.mysite.com. I want to be access as www.mysite.com/blog. I want to do my own main index.
But if I remove the index.php from root, it gives me problems like /blog won't find my static first page.
What I'm missing?
You need to change your apache virtualhosts settings.
More infos here.

How to redirect wordpress (installed inner directory) to main root address?

I've installed wordpress into a inner directory. like root/mysite . Why I didn't install it on root because there are so many addon domain installed, and I literally don't want to mess all addon domain folders with wordpress files inside root directory. My root directory is for www.example.com . And my wordpress site I've installed on root/mysite, so the url for that is www.example.com/mysites . Is there anyway to redirect www.example.com/mysites to www.example.com . As I said the only reason for not installing wordpress on my root, because I don't want to mess wordpress files, folders with other addon domain's folders on root.
So my main goal is showing a wordpress site on www.jimfahad.com that is installed on www.example.com/mysites. Is there any way?
Yes, you can leave the WordPress install and folders in mysites, but you have to copy the .htaccessfile and the index.php file to root. This will result in the visual URL of WordPress being in root (example.com), but the uploads, theme URLs, etc, being in example.com/mysites.
See the WordPress Codex > Giving WordPress Its Own Directory « Using a pre-existing subdirectory install on how to copy and edit the files:
1) Go to the General settings panel.
2) In the box for Site address (URL): change the address to the root
directory's URL. Example: http://example.com
3) Click Save Changes. (Do not worry about the error message and do
not try to see your blog at this point! You will probably get a
message about file not found.)
4) Copy (NOT MOVE!) the index.php and .htaccess files from the
WordPress (wordpress in our example) directory into the root directory
of your site—the latter is probably named something like www or
public_html. The .htaccess file is invisible, so you may have to set
your FTP client to show hidden files. If you are not using pretty
permalinks, then you may not have a .htaccess file. If you are running
WordPress on a Windows (IIS) server and are using pretty permalinks,
you'll have a web.config rather than a .htaccess file in your
WordPress directory.
5) Edit your root directory's index.php:
6) Open your root directory's index.php file in a text editor. Change
the line that says:
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
to the following, using your directory name for the WordPress core
files:
require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );
and save the file.
7) Login to your site (if you aren't still already). The URL should
still be http://example.com/wordpress/wp-admin/
8) If you have set up Permalinks, go to the Permalinks panel and
update your Permalink structure. WordPress will automatically update
your .htaccess file if it has the appropriate file permissions. If
WordPress can't write to your .htaccess file, it will display the new
rewrite rules to you, which you should manually copy into your
.htaccess file (in the same directory as the main index.php file.)

Resources