Taller buildings let us design better towns

I lived in a range of places as a kid, partly because my father was a bit of an itinerant who didn’t know what he wanted in life, other than that I mustn’t live with my mother. Go figure.

Eventually I got to settle down with my grandmother, but in the process I learned a lot about life as a child in different places. Where I felt safe and where I did not.

I did not feel safe in large council estates surrounding cities. I did feel safe in a caravan park. I did not feel safe in a city centre. I did feel safe in a built up part of a large city, living in an apartment block.

Continue reading “Taller buildings let us design better towns”

Resolving WordPress Migration Issue

I’m posting this for the benefit of anyone who experiences a similar problem to mine when moving WordPress from a directory into the web’s root directory.

What happened was that many links and pictures, some placed in there by plugins, others simply links that were typed in, had failed.

I realised that although I’d followed the migration instructions, a lot of things were left poorly sorted. A quick run through of all the tables showed where values were left incorrectly set. To fix this I wrote the following SQL statements and applied them to my database:

update wp_posts set guid = replace(guid,”/wordpress”,””);

update wp_postmeta set meta_value = replace(meta_value,”/wordpress”,””);

update wp_options set option_value = replace(option_value,”/wordpress”,””);

update wp_posts set post_content = replace(post_content,”/wordpress”,””);

These worked a treat.

To use this yourself I’ve done a version below that you can edit – simply replace $$$olddir$$$ with your old directory name (in my case wordpress) and replace $$$newdir$$$ with your new directory name. If your new directory is the root, remove the / at the beginning of each $$$newdir$$$ – see my example above.

A couple of warnings though – first take a backup of your database! Then think carefully – if you don’t know what you’re doing you may well be advised in seeking someone out who does.
update wp_posts set guid = replace(guid,”/$$$olddir$$$”,”/$$$newdir$$$”);

update wp_postmeta set meta_value = replace(meta_value,”/$$$olddir$$$”,”$$$newdir$$$”);

update wp_options set option_value = replace(option_value,”/$$$olddir$$$”,”$$$newdir$$$”);

update wp_posts set post_content = replace(post_content,”/$$$olddir$$$”,”$$$newdir$$$”);

Good luck and have fun!