WordPress Redirects Incorrectly After Deployment to New Server

11th February, 2013 – 1:30 pm

If you like to use different ports (I do) for development locally then you might find when deploying a WordPress site live it tries to redirect to http://www.mysite.com:8080  or similar.  You can’t fix this in the admin interface as that redirects too.

 

To fix this you need to run some SQL direct on the DB.

Login to your MySQL DB – select the relevant DB (check the webconfig if you’re not sure).

USE myDB name;

 

Then run this (replacing MYSITE):

UPDATE wp_options SET option_value = ‘http://www.MYSITE.com’ WHERE option_name = ‘siteurl’;
UPDATE wp_options SET option_value = ‘http://www.MYSITE.com’ WHERE option_name = ‘home’;

This is what this person was finding: http://wordpress.org/support/topic/need-help-wordpress-site-redirects-to-a-different-domain


The Worcester Wassail VIII – A Splash of Worcestershire Sauce

21st December, 2012 – 9:26 am

Saturday 22nd December Phil and I (and a host of others) shall be doing the annual ridiculous drive to Worcester to drink twelve pints of ale because that’s just what we do every year.  A twelve pint pub crawled known as “The Worcester Wassail”.  If nothing else you can say we’re consistent.

Each pub has a toast – Phil is the lead toaster and will don the ceremonial hat.

The route guide is available in a printable, fold into booklet format here.  The Worcester Wassail December 2012

The Worcester Wassail - Worcester Pub Crawl Route Guide with Map

The Worcester Wassail – Worcester Pub Crawl Route Guide with Map

 

Read more…


MS Project 2010 – Project Windows off screen, can’t restore or view – data is missing!

25th October, 2012 – 9:44 am

I’ve had an issue with MS Project where I mimimise the window within project of my active project and then no matter what I do with views or zoom I can’t seem to restore it.

Not found the root of the problem but you can restore your precious project plan via VBA.

EDIT – the code had some none ascii chars and I’ve updated the title to cover more issues I’ve solved with the code in solution 2 in the office. It seems to be an issue where you switch from multiple monitors to a single and back (e.g. undocking your laptop – something PMs do multiple times a day!)

Read more…


The Didsbury Dozen 2012 – with a Route Guide Booklet and Map

10th August, 2012 – 10:16 am

After careful debate we’ve decided to stick with the more classic route.  It features a few gastro pubs, a trendy bar and a McSpoons but we like it.

Here is an updated guide:  The Didsbury Dozen August 2012 – if you print it off it folds into a nice four page booklet.

 

The Didsbury Dozen - a full colour route guide with map and directions

The Didsbury Dozen – a full colour route guide with map and directions

We’re starting at 1300hrs in the Woodstock – see you there!

Read more…


PHP date function – output a friendly UK style date with ordinal date suffix and ‘hrs’ suffix on time

14th April, 2012 – 5:53 pm

This post is more to remind me in the future but perhaps someone else will find it useful?

I like the UK date format – I like to fight the Americanism of not using the ordinal suffix and I also like ‘hrs’ on 24-hour clock times.

Sun 18th Mar 19:00hrs

Read more…


Create 100 different images Containing a Number – The Image Equivalent of Lorem Ipsum

15th March, 2012 – 10:53 am

Often I get asked to design things which require displaying of products and I don’t yet have the images.  I’ve written a script to do just that.  If you’re not a PHP coder and don’t want to tweak the code and run it yourself bug  just want a zip with 100 – 600 random images – here it is.

I needed some filler in a test site and found using the same image for all products doesn’t help prove that the solution will work. What I needed was a 100 (or 600!) meaningful(ish) jpgs.

This script produces just that with random background colours and contains a number.

Here is the output – the colours please me greatly.

100 randomly coloured images with a number

Useful for filler for beta sites.

Read more…


Exporting MS Project 2007 Tasks to MS Excel with Indenting

26th January, 2012 – 2:12 pm

Apparently MS Project 2010 fixes this issue but I’ve often wanted to copy the tasks complete with  the indenting to Excel to provide a quick and dirty report for non-project users.

 

When you use copy and paste you loose the formatting – grrr!  Here is a quick and dirty solution.

  1. Insert column into Project (right click on the  grey header bar above your tasks and choose  Insert Column
  2. Select Field Name: Outline Level 
  3. Now select and copy your tasks including this column to Excel.
  4. For my formulas Col A = ID, Col B = Outline Level, Col C = task name, adjust yours accordingly!
  5. Insert in the next free column the following formula =CONCATENATE(REPT(”   “,B1-1),C1)
  6. There you go – quick and dirty as I said!
MS Project Tasks Formatted in Excel

MS Project Tasks Formatted in Excel

 


Moving PHP Solutions from Windows to Linux

17th December, 2011 – 11:16 am

I’m currently building a ticketing / holiday booking application in my spare time in PHP / MySQL.  When I started in PHP I used Linux for my development platform because my laptop ran, the rather terrible, Windows Vista.  I’ve since upgraded to Windows 7 and find myself using this instead of my Linux share now (oh the shame!).

I develop using the excellent WAMP Server  and then copy up to a cheapie Linux host I have.  What could possibly go wrong?!

Well for a start there are obvious configuration difference issues (trying to keep the same versions of PHP and its extensions.  I have the error settings set to be as verbose as possible to try and trap issues in my coding before I set the code lose on the server (these are not exposed on the website so that you don’t expose the error out to web visitors – security risks) but aside from that I’d expect PHP that runs fine and dandy hosted on my Windows dev platform to be the same on the Linux server – BIG ASSUMPTION!

com_create_guid – Creating GUIDS – Works on Windows, Not on Linux

Read more…


VII Worcester Wassail – 10th December 2011

8th December, 2011 – 9:43 pm

Saturday 10th December brings the seventh annual Worcester Wassail.  Twelve pints in the loyal city – we return every year just to completely ruin ourselves.

 

You can download our route guide here.

Worcester_Wassail_Dec_2011

Read more…


Plotting Numbers of Bugs Raised Each Day From a BugTracker in Excel

7th December, 2011 – 4:31 pm

I had a requirement to plot the number of bugs raised on each day on a graph to show how many are raised.   The bugs were stored in the very wonderful BugTracker.NET .  The problem was I had a list of bugs with a date time.

ID

MIN(dateUpdated)

2

11/04/2011 09:10

4

12/04/2011 16:48

14

18/04/2011 21:03

15

20/04/2011 07:14

16

20/04/2011 20:30

17

20/04/2011 20:30

 

Here is how I solved it.

Read more…