Browsing articles tagged with WordPress

WordPress on Windows

May 28, 2011   //   by demon   //   Tech  //  0 Comments

I currently run my WordPress site on a Windows Server with IIS. With WordPress being PHP, and I assume, design to run optimally on a LAMP infrastructure, there are a few hidden extras you need to do, in order to make use of WordPress’ full functionality.

1. WordPress Version

When you download your version of WordPress, make sure you download the version labelled “wordpress-<Version>-IIS”. I don’t actually know if there are differences in the code between the standard and IIS versions of WordPress, it mainly just looks like they add additional files:

  • install.sql (MySQL deployment script)
  • manifest.xml (for Windows Live Writer integration)
  • parameters.xml (for Windows Web App Gallery)

To be honest, it looks like the IIS version is the version that Microsoft uses to deploy WordPress using its Web Platform Installer.

2. Permalinks

If you want to make use of a permalink structure other than the default (http://www.domain.com/?p=123), then you need to add a Web.Config file to the root directory of your WordPress content with the following:

<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

If you change your Permalink structure to Month and Name (http://blog.demongreen.co.uk/2011/05/sample-post/), then when you try and browse by Category or Tag, then you will receive a 404: File not found error.

3. Scheduled Tasks

I am still working out how to get the Google Sitemap XML plugin to automatically generate the Sitemap.xml for this site.

I also get issues when trying to schedule posts to auto-publish.

Both issues may be because there is no WGET or Cron feature in Windows, so I will have to do more research and get back to you.

WordPress Spam

May 18, 2011   //   by demon   //   Tech  //  0 Comments

I can only assume it is because of the Windows 7 text in the title and the post, but I get on average 10-20 spam posts on this site, all going to this post: Install Sim City 2000 on Windows 7.

Tip to all, don’t write anything relating to Sim City or Windows 7 as you will likely spend days empting your WordPress spam-box!

WordPress Updates

April 27, 2011   //   by demon   //   Tech  //  0 Comments

Logged in to my WordPress site Dashboard to be greeted with a message that an update to WordPress is available. I host my own WordPress site, and with a working life in web hosting, I choose not to have FTP open as its just not safe with passwords sent in clear text. Yes, there is SFTP, but that is just a hassle for something I won’t use regularly and it means firewall ports need to be opened. I also just don’t trusted the stability of the FTP protocol, in terms of dropped connections and file locking.

When I need to access or update any files on my web servers, then I create a VPN session to the network and make the necessary changes. It is a lot more hassle to setup, but I havent had any post-installation issues and it just works. It is also makes me feel more secure when working. Surprisingly, from SA to UK, the connection is very stable and rarely drops – even when working over a WiFi connection.

Getting ack to my point, if I need to update WordPress then I have to do the following:

  • Manually download the update zip file from WordPress.org
  • Create a VPN connection to my web server network
  • Create website file and database backups
  • Upload the update zip file to the web server
  • Unpack the update zip file
  • Update WordPress
  • Delete the updatez ip file and cleanup
  • Close the VPN connection to my web server network
  • Test my WordPress site and reactivate all my plugins

I fully understand that this process is of my own doing, as I host my own site, however, is it not possible for the WordPress site to have a form of update function in the website that downloads and updates files within itself. This would then allow the archaic FTP option to be removed for the good and security of the Internet and would save me from the work above.

I don’t quite know how this update function would work, but Windows Update and SVN could offer some interesting methods.

Perhaps each WordPress-specific (wp-*.php) page has a unique identifier at the top/bottom of the page, specifying the version of the page. A basic WGET/PHP scheduled task command could check for the latest files, by comparing the version number on each page against the latest version numbers within a XML file on WordPress.org. A simple WGET command could then download the necessary files.

The WordPress site would then routinely check all the file versions against an XML file of it’s own and run any local update scripts where necessary.

The above would be able to be either manual or automatic, and would aid in faster delivery of WordPress updates – especially those that are security related. Updates could be pushed out at night, and ready for activation first thing in the morning.

I have only limited developer skills, but the above doesn’t sound too out of place. Could it be done?

Add Your Own WP-Admin Favicon

March 26, 2011   //   by demon   //   Tech, Visual  //  0 Comments

I might be taking this to a whole new ridiculous level now – but I am a graduated designer and I want this to look uniform, organised but still different.

My previous post complained about the lack of a favicon for Exchange OWA – well I noticed in my screenshot that WordPress WP-Admin doesn’t have one either. Well, we are in a position to do something about this one.

Follow these basic instructions to set up your own:

  • Download the WordPress favicon.ico I created and save it to your computer
  • Log in to your own WP-Admin and go to Media to upload the favicon.ico
  • Take a copy of the URL of the image
  • Open up <Root>\wp-admin\admin-header.php in notepad
  • Find the follwoing lines (lines 37 and 38):

<meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php echo get_option(‘blog_charset’); ?>” />
<title><?php echo $admin_title; ?></title>

  • Insert the following line in between these two:

<link rel=”shortcut icon” href=”Paste-The-URL-To-Your-Uploaded-Favicon-Here” />

  • You should have something that now looks like this:

<meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php echo get_option(‘blog_charset’); ?>” />
<link rel=”shortcut icon” href=”http://blog.demongreen.co.uk/wp-content/uploads/2011/03/favicon.ico” />
<title><?php echo $admin_title; ?></title>

All said and done, you end up with a 75% favicon-complete Favorites bar:

You will need to redo this everytime your upgrade WordPress, as each upgrade will overwrite the admin-header.php. A small price to pay for daily beauty.

Cufon Update for Internet Explorer 9

March 24, 2011   //   by demon   //   Tech  //  0 Comments

OK, I did hastily speak a little too quickly about Internet Explorer 9 breaking my site before doing some full investigation.

Well I have done a little Googling and some proding and probing, and discovered that a JavaScript file that my theme uses, was not IE9 compatible. By looking at the source from within IE9, I could see that the HTML was generating the missing text, then scrolling up to the top of the page, I found the JS file that was used to call the custom fonts.

The JavaScript file in question was by Cufon. All I had to do, was download the latest one, overwriting the existing one, and everything is back to normal!

demonGREEN WordPress Theme

January 17, 2011   //   by demon   //   Visual  //  0 Comments

Although I do have a fair amount of working knowledge of HTML and CSS, it’s not something that forms part of my regular working hours. Throw WordPress in to the mix, and putting together a theme that I would be happy with, was always going to be an adventure.

Working in an IT environment, one must always look towards the future. Therefore, any base theme I would use, would have to make use of all the latest features that WordPress has to offer, as well as those features yet to come. I always like to keep my options open, and hate to be confined to legacy systems.

I did look at building my very own theme from scratch, but I think that would only have been of real benefit had WordPress skinning been an integral part of the day job. With that in mind, I trawled through a lot of free themes available on the Internet, installing and testing out the options. I did even try to take the default TwentyTen theme to see if I could skin it from the beginning to exactly how I want it. I did eventually find a base layout and style that I liked, and set to work about hacking up the images and CSS.

I found the theme on Site5.com, where they have five excellent themes for free. The Boldy theme had the base layout, fonts, and images that I needed. Two days of some solid graft in Textpad and Photoshop and I finally managed to accommodate the demonGREEN logo with the style of the theme.

The theme has built-in options to upload your own logo, integrate social networks, configure a very beautiful home/splash page, use contact forms, integrate Twitter feeds, and make use of powerful SEO features.

My new theme still needs some work, tidying up a few loose ends and I certainly will keep an eye out on useful plugins to enhance the functionality of the site. I am currently using the following plugins:

  • Akismet –will protect your blog from comment and track-back spam
  • Google XML Sitemap – will generate a special XML sitemap which will help search engines like Google, Yahoo, Bing and Ask.com to better index your blog
  • Subscribe to Comments Reloaded – will plugin that enables commenters to sign up for e-mail notifications
  • WP to Twitter – will Update Twitter when you create a new blog post

I think it is only fair to make the theme available, currently in its 1.0 version. You can download it here, and would love to know your feedback. I have tried to comment out the features and CSS I haven’t used, so it can (within reason) be returned close to its former glory. I will ofcourse keep the latest version available with any new bug fixes/changes I make.