Configuring Kubrick to work with a nested blog directory
Here is my first stab at a mini-HOWTO on configuring Michael Heilemann’s Kubrick theme to work with WordPress when installed in a nested (non root) directory structure. As Michael mentions in the readme included with Kubrick it is pretty easy; however, a few people had emailed me asking that I document how I was able to get it to work on my own site.
The detailed instructions follow below. Please note that they reflect the 1.2.2d release of Kubrick and to the best of my knowledge they are correct / accurate. Your experience may vary so back up your original files before starting and good luck! Thanks again Michael for making such a cool theme available.
Before you begin be sure to have your WordPress address (URI) and Blog address (URI) set properly for your install of WordPress. You can find this on the General Options tab of the WordPress admin interface. It should reflect your nested directory. For example: http://joncellini.com/blog/
Now copy the files to your server as described in the instructions then make the following edits. I included the line number of the various edits to make describing them easier.
-
kubrick.css
- Note the instructions on line 15. Alter the references to
"localhost"on lines 18 and 25 to refer to your actual hostname - Alter the url referred to in lines 27, 34 and 40 to reflect the proper nested path. Note that in the 1.2.2d release of Kubrick the default paths are incorrect. The images are included in the
/kubrickdirectory not thewp-images/kubrickdirectory - Edit the url referred to in line 57 to reference the proper nested path
- Edit the url referred to in line 66 to reference the proper nested path
- Edit the url referred to in line 78 to reference the proper nested path
- Edit the url referred to in line 82 to reference the proper nested path
- Edit the url referred to in line 88 to reference the proper nested path
- Edit the url referred to in line 230 to reference the proper nested path
- Edit the url referred to in line 280 to reference the proper nested path
- Edit the url referred to in line 524 to reference the proper nested path
-
archivespage.php
- Edit the include statement in line 3 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 8 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 10 to reference the proper nested path relative to the document root of the HTTP server
- Edit the four occurrences of hyperlinks (look for the
a href=) in line 23 to reference the proper nested path to your archives - Edit the include statement in line 44 to reference the proper nested path relative to the document root of the HTTP server
-
index.php
- Edit the include statement in line 3 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 7 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 9 to reference the proper nested path relative to the document root of the HTTP server
- Edit the four occurrences of hyperlinks (look for the
a href=) in line 14 to reference the proper nested path to your archives - Edit the include statement in line 32 to reference the proper nested path to your archives
- Edit the include statement in line 37 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 58 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 82 to reference the proper nested path relative to the document root of the HTTP server
-
permalink.php
- Edit the include statement in line 3 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 7 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 9 to reference the proper nested path relative to the document root of the HTTP server
- Edit the four occurrences of hyperlinks (look for the
a href=) in line 19 to reference the proper nested path to your archives - Edit the include statement in line 37 to reference the proper nested path relative to the document root of the HTTP server
-
search.php
- Edit the include statement in line 1 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 3 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 7 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 9 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 28 to reference the proper nested path relative to the document root of the HTTP server
- Edit the four occurrences of hyperlinks (look for the
a href=) in line 34 to reference the proper nested path to your archives - Edit the include statement in line 48 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 50 to reference the proper nested path relative to the document root of the HTTP server
-
wp-comments.php
- Edit the form action in line 59 to reference the proper nested path
-
kubrick/404.php
- Edit the include statement in line 1 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 3 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 7 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 9 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 11 to reference the proper nested path relative to the document root of the HTTP server
- Edit the include statement in line 13 to reference the proper nested path relative to the document root of the HTTP server
-
kubrick/include-footer.php
- Change the two references to
binarybonsai.comin line 8 to reflect the proper relative URL to the feeds on your own site. This seems to be an error in the 1.2.2d Kubrick release
-
kubrick/include-searchform.php
- Edit the echo statement in line 2 to reference the proper nested path
-
kubrick/include-sidebartop.php
- Edit the form action in line 2 to reference the proper nested path
-
.htaccess (htaccess_template)
- Edit and save this file as
.htaccess - Edit the rewrite rule targets (the string on the right) to reflect the nested path to the various documents, you will edit every line except for lines 1,2 and 35
- Change the rewrite rule target on line 33 to instead be
404.phpand ensure you have the proper nested path to the document. This seems to be an error in the 1.2.2d Kubrick release as pointed out here.
Assuming you made all these edits properly you should find that everything should now be working as you would expect. On my own site I have made a few additional tweaks to make them behave more how I desired. It is still a work in progress but so far I’m really happy with how it has worked out. Leave a comment if you see any errors or can think of something that needs to be clarified further.
Perfect, what a hick like me need.
Thanks for taking the time to write this out. Now, I just have to follow it step for step, but then, isn’t that what Sunday’s are for?
Ta!
I’d spent most of sunday going through each file and trying to find everything I had to change. I thought I had got them all but I found a few extremely important bits thanks to this guide. Extremely helpful!
Crap, forgot to add this bit…
The only thing I’m still unsure about is the .htaccess editing, from what I can see everything should be a-ok (apart from the 404 change and line 23 [index.php]).
I don’t know a whole lot about the .htaccess file, as I haven’t used it extensively yet.
last post… i’m just crowding up your comments section now.
nix what I just said, I’m a doofus.
Hi Laika I’m glad you found this helpful. With the release of Kubrick 1.2.3a most of these edits are no longer necessary.
No worries Chris. Hope you got everything working ok.
So far, everything onsite is running as it should, or, at least it appears to be, so I’m happy - again, thanks Jon for the instructions they were of immense help.
No problem, glad it was helpful.