shogun Posted May 12, 2020 Share Posted May 12, 2020 I love processwire. I was just wondering if a site is built in a certain way and we don't want the whole site to be driven by the processwire cms, can we use the ProcessWire cms for just a specific page on the website without creating templates or using the database for any other page? I know I can do this with Wordpress. Was just wondering if it was possible with Processwire and how that would work? Link to comment Share on other sites More sharing options...
huseyin Posted May 12, 2020 Share Posted May 12, 2020 Hello, Did not tried this. But i thing a scenario as following will work. Install PW under a subpage. Like www.domain.com/pw Create your site as usual. In a php file where you want to use pw include the index of pw like; include("pw/index.php"); This should be enough. (not sure if the namespace needed anycase) 1 Link to comment Share on other sites More sharing options...
shogun Posted May 12, 2020 Author Share Posted May 12, 2020 Hmm interesting. So you're thinking just install processwire in its own subdirectory? Link to comment Share on other sites More sharing options...
elabx Posted May 12, 2020 Share Posted May 12, 2020 1 minute ago, shogun said: Hmm interesting. So you're thinking just install processwire in its own subdirectory? This should work fine! After the include, API variables like $pages should be available, letting your grab whatever content you are managing with PW. Link to comment Share on other sites More sharing options...
bernhard Posted May 12, 2020 Share Posted May 12, 2020 2 hours ago, shogun said: I know I can do this with Wordpress. How does wordpress do this? You could also do a regular PW installation and add a folder "static" in the root directory. Then you could serve all files that are in this directory via custom htaccess rules (not an expert here ? ). eg /static/foo.html would be served when example.com/foo is requested and /static/bar.html instead of example.com/bar Link to comment Share on other sites More sharing options...
shogun Posted May 12, 2020 Author Share Posted May 12, 2020 2 hours ago, bernhard said: How does wordpress do this? You add wordpress to just the sub-directory. Not excited about wordpress anyway, but that's how you can do it. Link to comment Share on other sites More sharing options...
teppo Posted May 13, 2020 Share Posted May 13, 2020 We could possibly be talking about different things here, but I don't see a difference between WordPress and ProcessWire in this regard: both can be installed into a subdirectory. There are a number of topics here regarding subdirectory installs ? If you're looking into something more specific or custom, some sort of .htaccess trick (or including ProcessWire's index.php, essentially bootstrapping ProcessWire within plain PHP script) might be the way to go — but again, if we're just talking about running a ProcessWire site from a subdirectory, that shouldn't be necessary at all. 1 Link to comment Share on other sites More sharing options...
Gideon So Posted May 13, 2020 Share Posted May 13, 2020 I run many sites in sub-directory in my development server. No problem at all. Link to comment Share on other sites More sharing options...
dotnetic Posted May 13, 2020 Share Posted May 13, 2020 There is not only the possibility to use ProcessWire in a subdirectory and for one page only. You can also use ProcessWire content in other pages, that are not being served by ProcessWire. This process is called bootstrapping and others here already wrote about this. You can find more information in "Including and bootstrapping ProcessWire" 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now