How can I upload a folder like a regular site and place it within a Wordpress folder but not have wordpress override the URLs for that particular folder.
Thanks
Your question is not really how you can do this, but why do it?
WordPress is overriding your URLs because of its own permalinks and rewrite rules in the .htaccess that handles the folder Wordpress is installed in and all subdirectories. Read https://codex.wordpress.org/htaccess
In order to place a "regular" site within a WordPress folder, you're going to have to work out some complex regex expressions https://stackoverflow.com/questions/tagged/regex and integrate them into Wordpress's own rewrite rules so both sites work. And then, when you change WordPress's own permalinks from admin and WordPress writes changes to .htaccess https://stackoverflow.com/questions/tagged/.htaccess, your own custom rules won't function anymore.
Directories below a directory with an .htaccess file will inherit those rewrite directives, so you can "negate" rewrite rules by putting a blank .htaccess file - or one with your own rules in it - in that folder. And this directory inheriting method is further controlled by server directives, if you have access to Apache httpd; which you won't, unless you're running your own server.
Again, why make things so complex? If you're going to use WordPress, integrate your content and site into WordPress. It is straightforward to integrate your own PHP and MySQL data into a WordPress site through the use of page templates. If you want a plain PHP/MySQL site in the same hosting area as WordPress, keep it separate.
Related
Is it possible to disable wordpress from a sub-directory?
Wordpress is currently installed in root.
So using wordpress' own CMS-functionality by going to Settings->General and changing Site-adress-URL wouldn't accomplish that since it would just move wordpress into a subdirectory. (which pretty much is the opposite of what i want to accomplish).
Is there any way to make wordpress ignore a specific subdirectory. Eg. Uploads/ to make me create standalone code there?
By default this should just work. The .htaccess file has a rule to ignore existing folders and files from rewrites. Creating a folder next to wordPress with custom code should work.
I need to use wordpress/woocommerce functions on codeigniter. I've tried the Woocommerce Rest Api and it is extremely slow. So for an alternative i've copied wordpress/woocommerce to codeigniter upload folder. In the index.php in codeigniter i've added
require_once('/home/sites/example.co.uk/public_html/retail/uploads/wordpress/wp-load.php');
require_once('/home/sites/example.co.uk/public_html/retail/uploads/wordpress/wp-blog-header.php');
Which is fine, i can now use wordpress functions but my codeigniter urls have been changed. I've removed the .htaccess from the Wordpress folder and urls are still changed. How do i solve?
I solved this by changing the site_url to wp_site_url in the wordpress folder. Now the urls in codeigniter aren't being changed.
I have a simple HTML microsite, which I want to put inside my wordpress website. For example: Wordpress website is: abc.com
I want to put my microsite inside this wordpress site. So URL becomes:
abc.com/microsite/
But, wordpress treats any url as its own. How can put "abc.com/microsite/" urls to Wordpress Ignore list. So that any pages inside microsite folder executes independently.
just put you folder 'microsite' in root(Where you find wp-admin,wp-content and wp-include folder). and
you are able to access the folder
"abc.com/microsite/ by this url
If you are still having issues with accessing the subfolder, try renaming the .htaccess to .htaccess-bak in order for WordPress to regenerate the file again. Understand that your website might temporarily go down.
I've found this solution to help in some cases, but I don't know exactly why, ergo I am not sure it will work. And if you feel uncomfortable editing the .htaccess file I suggest you learn more about it (as should I). It is a very powerful file and WordPress uses it a good deal.
P.S. The file is located in the same folder, WordPress' root folder where you find /wp-admin/, /wp-content/, etc. It is hidden by some hosting providers, but I've always been able to find them through FTP with the hosting companies I've used before.
I don't know a lot about .htaccess.
I have a web with Wordpress and I made a part private only for subscribers. I have installed a couple of Wordpress plugins to control the access to that page. The problem is that the "private" page links to a folder where I have a lot of .html pages. That is the folder I want to protect. I have used the http_refered in the .htaccess but I know it is very easy to hack it.
Is there any way to write in the .htaccess file a command that check the Wordpress user file and see if the user belongs to the "suscriber" group?
I suggest to protect the private page with password (this is common feature in Wordpress) and do not mess with the .htaccess file.
Anyhow, the is no way to tell the Apache (because the .htaccess is applied from it) that this or that user is registered or approved user. This can be done on different level - PHP and/or Wordpress logic.
I am trying to merge my custom made directory site together with my wordpress site in one domain.
There seems to be issues with the url being redirected to my wordpress categories. How can i rewrite url in wordpress to compliment my directory site.
I don't think it's possible. Category, tag, page, post etc. slugs could collide with your directory names. You would have to either create a filter for WP to redirect specific URLs to your old content or modify your .htaccess file. Both methods are extremely complicated if you have a lot of pages, and overkill if you have only a few.
Why not migrate your old content to WP? Or if you don't want to do that, install WP into a subdirectory of your site, like /blog.