Custom uploads directory for WordPress uploads

Tip 0 in this list of tips for a fresh WordPress installation mentions how to configure a custom uploads directory.  By default, uploads go into wp-content/uploads/ folder, but you can easily change that in your administration.  The tip gives to benefits for moving your uploads somewhere else:

These are good, but I think there are more:

  • It’s easier to share the same uploads between several sites.  For example, if your site is multilingual and you use a separate WordPress installation for each language, then you can have a single uploads folder for all your translated sites. (However, there is still something that needs to be done with the database, so it has attachment data properly).
  • In case you move your uploads into a sub-domain, you can save bandwidth.  Caching can be improved, and you don’t need to send cookies any more.   Static content, such as images, CSS and JavaScript files, often don’t need any cookies passed in the request, but if your site is using cookies for some pages, often cookies will be sent for static data as well.  This advantage of course applies more to sites with a lot of traffic and static content.

WordPress theme change check list

I came across this post, with a self explanatory title – “13 Most Important Things to do When Changing the WordPress Theme“.  This is particularly relevant to me, since I am updating my theme right this moment.   And so, I thought, I’d just revisit the list items of that post with my own comments, since they are so fresh.

  • Take a backup of your current theme folder. That is always a good advice.   Better even, take full backup of your blog, including the database dump.   Why is the dump relevant for theme upgrade?  No, not because I am obsessed with backups now that I lost all my archives.  But because most themes these days include dynamic sidebars, which you usually fill with widgets.  Widgets configuration is kept in the database.  And when you are moving to a new theme, your dynamic sidebars often get out of sync, and you try to fix it fast by re-arranging widgets again.  In case things go very wrong, it’ll help to have a database dump as well, which, when restored, will bring back your widget configuration.
  • Check for broken links.  A new theme will hardly affect links in your content, but everything around it – headers, footers, sidebars, links to RSS feeds, etc – can easily get damaged.  This happens especially often when you use a testing or development environment which is separate from your main production blog.
  • Look for possible security loopholes. Ideally, you should do this BEFORE you move your site to the new theme.  The best approach here is to combine manual and automatic checks. Manual checks include reading the theme source code, checking the site in different browsers, from different IP address, while logged in with different access levels, as well as logged out altogether, etc. Automatic checks are provided by a whole bunch of applications, including some security oriented WordPress plugins.
  • Remove unnecessary code from your WordPress header. This has a lot to do with tightening up the security of your WordPress installation.  The less information you give out to potential attackers, the better.  I have no idea why this item is separated in that list from the previous one.
  • Make sure your RSS subscription link is correct.  If you link to several feeds (posts, comments, category, etc) – check them all.  Also make sure that you have them in your header for RSS auto-discovery to work.  The best approach here is to use WordPress builtin functions for RSS links, not hardcode them by hand.
  • Check if all your pages are listed properly.  Again, it’s not always possible to code your menus and navigation to work in every theme out there, but sticking to WordPress Codex ways you guarantee to minimize the troubles for yourself.
  • Put back your stats tracking code.  I suggest to find and install the suitable plugin.  There are many available for practically any statistics package.  The plugin will usually take care of installing all the necessary codes, goal tracking, conversions, and the rest.  Plus you’ll keep you configuration in simple and easy way via administration interface, rather than editing theme source files directly.
  • Check your website from different browsers.  That’s the second best advice after taking a backup before even starting.  Cross-browser issues are the most common to appear and the most nerve-breaking to fix.  Even if you don’t know how to fix them yourself, still check your new theme for any glitches in different browsers, to at least know that you have them.  Fixing them can be arranged separately.  If you don’t have different browser versions available at hand, ask your friends or readers to help, or use web tools, such as BrowserShots.
  • Check if you sidebar content is correct.  Especially so, if you had custom sidebars for the front page, categories, posts, pages, search results, archives, etc.  Even more so, if you are using widgets (see above).
  • Re-evaluate your plugin usage.  As the original post mentions, it’s a good time to see if you still need all those plugins you were using before.  And there is another side to this too.  Many heavily customized themes keep some functionality code in functions.php file.  When moving to another theme, the functions.php from the old theme might not necessarily work under the new one.  Maybe it’s a good time to move some of that code into more generic plugins and widgets.
  • Put back your AdSense / other ads code.  This is somewhat similar to your statistics.  If you use AdSense or any other well-known advertising service, you’d be better of with installing and configuring an appropriate plugin.  If the ads are customized, than you should probably move them out of the theme code into separate files and then just include() where appropriate.  Definitely worth a check after the move is done.  While checking the site in different browsers, take a look at the ads as well, just to make sure all your visitors can see them properly.
  • Check if your favicon is proper.  Ideally, this shouldn’t break by your theme change.  While there is a way to specify favicon’s location in your theme’s header, I find it better to drop the favicon into root folder of your site – most browsers will pick it up from their automatically.  And it will work even when your blog is horribly broken.  Additionally, I don’t think changing your favicon often (even if ever) is a good idea.  Favicon is like your site’s avatar.  It takes time for people to get used to it and recognize it.  Why change it when some of your visitors just got used to this one?  Unless, of course, your favicon doesn’t represent your site at all anymore.  Then – yes.
  • Look how you can optimize your blog.  Yeah, well, true.  However, before you start optimizing anything, make sure that you have the full backup (try restoring from it to a test blog), make sure that everything works before you start optimization, and make sure that there is any need for optimization at all.  Premature optimization is evil.
  • Put up a post about the new design.  This is a good idea.  Before you do a full blown post however, maybe you should post a short update to your Twitter account (you do have a Twitter account, don’t you?).  This way, your followers can point out any bugs in time to fix them before you notify the whole blogosphere, search engines, and RSS feeds.  Once you are completely sure that everything works – yes, indeed, blog about it.  Tell your readers why you changed the theme, if there are any new features, and how much effort it took you to put it up.  A post like this would usually inspire at least a few of your readers to do something with their blogs.  And that’s something that we definitely need – more and better blogs.

P.S.: even though the original post’s title says “13 things“, there are in fact 14 items on that list.  I guess the counting went off, because it started from 0 and not 1.

Delete files dialogue in KDE = ugly

As I am getting used to KDE 4 more and more, I am enjoying it more and more.  It delivers plenty of visual pleasure while being quite fast and user friendly.  However, there this one tiny little thing which annoyed the heck out of me since ancient times.   It’s the delete files confirmation dialogue.  Every time I select one or more files to delete, here is what I get.

KDE delete files dialogue
KDE delete files dialogue

The more files I have to delete and the longer their paths, the uglier it looks.  And you know what annoys me the most?  It’s that fixing this ugliness is pretty simple.  Just collapse and hide the list of files which are about to be deleted, and give a “Details…” button or link to expand the list for those who really care or want to double check.  This way, the popup will be much smaller, providing enough of necessary information (“delete” vs. “move to Trash”, and “3 items” vs. “all these items”).

I don’t know how this managed to stay in for so long.  Am I the only one who cares about this?  Or are there so few KDE developers that nobody has the time to fix this?  Do I really need to this myself?  I hope not …

Fanboys

Fanboys

Managed to catch “Fanboys” in the cinema.  I’ve seen the trailer of it some time ago and thought that I should watch the movie.  And I was right.  I guess most movie fans, and especially those of “Star Wars” religion among you, will enjoy the film.  It’s pretty light, with lots of movie-related jokes, and a touch of drama, which only makes it so much better.

I found the cast to be quite interesting.  Main characters are played by not yet so famous young actors (they needed the geeky look after all) – Jay Baruchel, Kristen Bell,  Dan Fogler.  But while they move through the film, there are many familiar face such as Danny Trejo, Seth Rogen, William Shatner and even Kevin Smith.  Even though their roles are very short, almost cameos.

While this film is not a masterpiece by any measure, I did enjoy it quite a bit.  4 stars.

One blog to rule them all …

Since I lost all my archives and had to start over from scratch, I kept thinking a lot about what’s best – create several blogs, one for each of my major interests, or post everything in one blog.  Each has its benefits and pitfalls.

Having content in several blogs helps audience targeting and search engine optimization.  It’s easier for visitors to understand what the blog is all about.   Navigation is simpler, and niche-specific customizations are easier to do.  For example, just before I lost my WordPress archives I experimented with taxonomies for movies data – genres, directors, actors, etc.

On the other hand, keeping track of several blogs is way much more work.  Cross-topic posts don’t work to well.  And there is always this chance of a hobby change or priority shift.   If I have an interest in pink flying elephants and a separate blog devoted to just them, and then my interest dies out a couple of years later, I end up with a blog which has a bunch of interesting stuff “from before”, but never gets updated anymore.  And then it dies out and disappears.

And with all that data gone recently, I hate to hear anything about “disappears”.  Plus I miss huge archives spanning a few years and “this day in previous years” on the sidebar of my site.  So, I decided to keep everything in one place.  I’ll try my best to keep it well organized with categories and tags.  Especially now that I know better how to use them together (not as in say pre-2000, when tags weren’t widely used yet and sub-categories were poorly supported).

So, movie reviews will be posted to this blog under the category “Movies”.  Also, movie rating system will be simplified.  In stead of following IMDB‘s notation of “from 1 to 10, with fractions“, I’ll use “an integer from 1 to 5“.  It should be something along the lines of:

  1. Avoid at all costs.  Negative experience, possibly with consequences.
  2. Time-waster.  Watch it only if you ran out of choices, or studying bad examples for your new project.
  3. Average.  Nothing special, unoriginal, boring.
  4. Pretty good.  Worth going to the movies for or maybe even buying a DVD.
  5. Excellent.  Perfect.  Masterpiece.  Must see.  Highly recommended.

I’ll also use tags to highlight people, who participated in the making of the movie.

Another upcoming change is for Technology.  I work with some tools more than I do with others.  Those, which I think are important to me, will get a sub-category under Technology.  One of these tools will be WordPress.  I used to have a side project WordPress Bits some time ago.  It’s been a long while since I abandoned it.  But my interest is always somewhere nearby.  And I see there is lots of interest around that project, since it still gets comments, questions, and pointers to updated information.  I’ll resurrect it and move it over here.

These are the upcoming changes, as I see them now.