I have ci installed in root and wordpress inside wordpress directory.
I already allowed wordpress to use root by setting site url and main .htaccess to rewrite wordpress directory, but because ci is inside root i have url conflict between ci and wordpress..
You know that ci using pretty links, so when i try to run this for example:
example.com/ci_class/ci_function
It's redirects me to wordpress template with message
Not Found
This happens probably because i included wordpress wp-load.php inside index.php of codeignitier...
What i can to do?
I want to use wordpress functions inside ci, but i also want that ci url works fine...
Related
I am using a wordpress theme which I have modified a bit, based on the "Revera" Wordpress theme.
I have used it on other sites and it has worded fine. However, I have always installed it in the root of the domain. This time I have installed it on http://www.gas-sense.co.uk/blog
It isn't generating the usual homepage layout ( see http://www.georgeedwards.co )
Just wondering if the themes are typically setup to trigger the homepage layout? and if that is defined in a particular section of the php ?
The root folder is not a problem, you probably didn't set up the site url correctly, read the docs bellow
https://codex.wordpress.org/Changing_The_Site_URL
this is my problem with laravel & WordPress:
i need to put a blog inside laravel installation.
i want to use WordPress but i can't figure it out.
i put the WP files inside public/blog/ but i can't install it.
the redirect is the error part.
i need to say that to Apache:
if( $url = public/blog/* ){
ignore normal laravel routing system & redirect to WordPress inside (public/blog/*)
}
To keep your laravel .htaccess clean, just copy the .htaccess from any active wordpress project using clean urls (or look in wordpress doc) and copy it to your clean wordpress folder in public/bloc (it's nearly the same as for the laravel).
Without the .htaccess in your blog folder the laravel "public/.htaccess" redirect all not specific and existing files url to "public/index.php"
to solve this I just put the laravel folder next to the wpBlog folder.
& used namespaces to redirect the user to each based on the used url.
SO:-
blog.website.com : will redirect to the wp blog
site.website.com : will redirect to the laravel website
I have a wordpress installed to a subfolder in the root of my site. So if my site is "site.com", the wordpress is in "site.com/blog".
I want to display some posts from wordpress to pages outside of the blog directory. I have read some articles telling that to use wordpress outside it's folder i just have to include or require the "wp-load.php" from wordpress to the page. Now the problem is I have tried using this method, but when I view the page in the browser, it just redirects to "wp-admin/install.php" which doesn't exists because i am at the root directory.
Change your site url from
http://www.site.com/blog/
to
http://www.site.com/
Read http://codex.wordpress.org/Changing_The_Site_URL
In database it would be found in wp_options table
I have made a website (WP based) and put every stuff inside the /site folder.
I did that, thinking of creating "custom" systems, and putting each one inside a folder, so for example: /promo would go to something else than the website...
But, I have tried with both .htaccess redirect and PHP location redirect, and when I try to "share" the website, without it's /site folder included, Facebook doesen't detect's the site meta...
Also, is it a problem for google, to use redirect's when accessing the website without the /site WP home folder? I mean, a guy comming from a www.onesite.com would have it's "referer" header as onesite, or mysite?
Thanks
I feel like you're creating your own problems. Just put WordPress in document root and don't bother with rewriting to a subdirectory. WordPress won't delete any custom files or folders when updating.
If you have some custom part that you want to reach through http://www.example.com/promo. Put it in the promo folder under the document root.
If want to reach the custom part through http://promo.example.com, just create new virtual host.
I have developed the CRM based web application what i need to do is to integrate the wordpres with my CI first i have the problem when i include the main WP file
require('./wp-blog-header.php');
in my one of the CI view file the error i was getting that function site_url() conflicts this function is the base function of both WP and CI ,although i found a solution to include the WP file in the main index.php file of CI but there is uncertainity too that after this the session library of CI stops working is.
How to show the posts of WP in the footer of my CRM?
When using include or require in my CodeIgniter views I make sure the files I am linking to are outside of the CodeIgniter application folder as I had trouble using files there because of some permission problems. My solution was to just keep a folder in my web directory. You also cannot use base_url or site_url CodeIgniter functions here since you want to get the server path not the web address of the file. So you can use the php variable $_SERVER['DOCUMENT_ROOT'] which will return the root of your web directory.
It might look something like this:
require($_SERVER['DOCUMENT_ROOT'].'wp-blog-header.php');
Which would work if wp-blog-header.php was in your web root directory.