WordPress vs WordPress

The ONLY correct way to write it, is the very first way I wrote it in the title.

WordPress

From version 3.0, WordPress included a filter in core that changed any instances of “WordPress” to “WordPress”, which would have included the title above.

This did break a lot of links and URLs that were in place in the content, excerpt and titles of posts. They modified the code somewhat, but the filter still exists, unless you install the plugin: https://wordpress.org/plugins/remove-wordpress-to-wordpress-filter/

Things you probably shouldn’t say to your kids

image

We were walking to the shops today.
Jason. Look dad, a chicken
Dad. no mate, that’s a duck
J. A duck?
D. Well,  it looks like a duck
J. Look like a duck?
D. It sounds like a duck
J. Sounds like a duck
D. Tastes a little bit like chicken
J. Taste like chicken?
D. A little bit. But it’s a duck
J. Duck

A little bit later a dog barked.

J. What’s that dad?
D. What do you think it is?
J. It’s a dog.
D. Yep that’s right, it’s a dog. Well, it sounds like a dog (we couldn’t see it)
J. Sounds like a dog
D. So it’s probably a dog
J. Taste like dog?
D. Taste like chicken actually (I don’t know why I said that)
J. Mmmm dog, taste like chicken

A little later, we’re at the shopping center, a guy walks past with his dog. Jason says to mum, “look mum, dog”
Mum. Yes, dog
J. Tastes like chicken!
M: what?
D. Errr…

Changing WordPress username

wordpress profile capture showing the message "can't change username"Have you ever checked your WordPress profile and noticed you can’t change your username?

Did you ever realise that most people choose the same display name as the username, which then gives hackers a legitimate username to try and hack into your site?

Do you use the same username and display name and now want to change your username (because you don’t want to change your display name)?

Then you should change your username.

There are two ways you could do this:-

  1. through WordPress itself:
    • Create a new user with the username (backend name) that you want
    • Login as that user and verify your account
    • Make sure permissions are right between the users (you’ll want the new user to be (super/) admin)
    • Delete the old user and assign all old posts to the new user
  2. through the database:-
    • edit the username for the user in the user table
    • edit the username in the site meta table for super admin (only applicable in a multi site install)

I didn’t do it through WordPress itself, since I do like to play with the database :) But in theory it should work and is the suggested theory on multiple sites.

Let’s break down the second option:

  1. Make a backup of the database
  2. Open the database using your chosen method
    • for me this is to log into my providers cPanel, and select myPHPAdmin
    • go to the users table (not the usermeta table). The table will be called something {DB_Prefix}_users (usually wp_users or wp_x_users in a multisite install where x is the identifier for the site).
    • change the username field to the new desired name
    • when you save the entry you will most likely be kicked out of the backend immediately, simply login with your new username and all is good to go
    • if you do NOT have a MultiSite install, your job is done. If you DO have a multisite install, read on:
  3. still in the database, navigate to the wp_sitemeta table and look for the meta_key: site_admins.
    • There will be an entry like: <pre>a:1:{i:0;s:4:”john”;}</pre> and change it to the username you created in step 2. You will also need to change the “S:n” (in this case “s:4”) to a new value depending on the length of your username. So you’ll note for “john” it’s 4. For “john-you-won’t-guess-this-827646″ you would make the entry:<pre>a:1:{i:0;s:31:”john-you-wont-guess-this-827646”;}</pre>. For reference, the “i:0” is Index 0. If you have multiple users here, this line will have multiple indexes with each one serialised onto the line and having their own section. Make sure you change the correct one(s).

Not doing this final step will not kick you from the individual site admins, but it will prevent you from getting to the Network Settings area to add plugins, themes and do other “network” maintenance things (like adding or removing sites amongst others).

I’ll let you know now, I learned about step 3 the hard way after being locked out from the Network Settings area after changing my main username.

I could do everything an admin could do for their site, I just could no longer administer the network.

Searching the net found this entry on WordPress.org and solved my problem.

Youtube embedded videos in WordPress not working

You’ll notice above that there is a youtube URL on the first line… it hasn’t embedded within the post.

UPDATE 2015-12-10: it’s working now, is it a WordPress 4.4 thing? I have disabled a LOT of plugins for the moment, I’ll come back and revisit this in the next couple of days. I have spent many hours working on this problem over the last few months and having just found I’ve had other issues, I’ll revisit this again

Embed the URL without embed tags
Embed the URL without embed tags

Also, I have just learned today that the youtube style of embedding without embed tags have been extended in WordPress 4.4 to include URLs to your own WordPress site (and possibly others).

Are you finding your http://youtu.be/{videocode} youtube links not embedding correctly or working in WordPress?

The correct format for the link is any one of the following:

http://youtu.be/{videocode}
http://youtube.com/watch?v={videocode}
[ embed]http://youtu.be/{videocode}[/embed ]

(there is a space before the embed in the above one to have it display correctly)

There are three things to watch out for to ensure this works. And if you do each of these, then you don’t need to use the [ embed ] code you see in the third example above. They are:

  1. Ensure the URL is on it’s own line
  2. Ensure you use HTTP in lieu of HTTPS (*1)
  3. Ensure the link does NOT appear on the first DISPLAYED line of the content

*1 : this is not a big one, since it seems most of the time it works, but for some reason it didn’t when I used it on this particular occasion.

I say DISPLAYED because in an effort to fix this, I tried putting a blank line for the first line. The problem persisted. It also didn’t help to include just a full-stop (period) there either.

I do believe it could also be theme related as this theme does not use the different post type options that is present in the newer themes. And from what I did find elsewhere, selecting different options in that meta-box can alter this behaviour. I will probably be changing themes in the coming months as I work further on my own custom theme, but for the time being if I want it to appear on the first line, I will use the appropriate [ embed ] code above (with the space removed!). This was not a problem I found documented anywhere else, so hopefully you have found this useful!

40kg in 921 days

IMG_5999More about this year specifically in another post down the track. That probably won’t be too far away, certainly sooner than my last post about weight loss anyway!

I’ve been keeping a low blogging profile about my weight loss over the last few years, since I really haven’t been doing too great. But this year I really have been able to turn it around.

I was at my maximum about two and a half years ago. March 2013. I came in at a staggering 124kg! Jason was less than a year old and I made a decision to lose some weight so I could do more with him etc etc. I stuck at it for a while and eventually got down to a low of just over 101kg. I couldn’t break under the 100kg and so I gave up.

2013 was actually my second attempt at losing weight the first attempt is the one recorded here on this website, albeit not too well.

Then this year I decided to give it another go and I’ve done much better.

The stats speak for themselves, they’re up there at the top of the post:
2013-03-05 124kg
2015-09-13 84kg
That’s down 40kg in 2.5 years (@0.3kg/week but that’s not accurate)

I’ve done much better this year, but as I mentioned, I’ll post more specific details about that down the track. I have a couple more milestones I’d like to hit before making things more blog-public.

 

WordPress media library limited to 10MB

Screenshot 2015-09-14 11.23.102
I think I’m a little over my quota!

Have you ever noticed this in your blog? It’s never been there before, but it appeared in the last day or two. At the time I wasn’t sure how or why. It’s my blog hosted on one of my web hosting accounts, and I have no shortage of space. So why was I getting this warning?

Screenshot 2015-09-14 11.35.24Worse yet, I went to add a photo, and this happened. That’s when I realised the quota was real!

My first question is, what dickhead gave me such a quota!

My first action was to work out where it was imposed.

Then I found who the right royal dick was. It was yours truly!

I’ve been doing too much playing in the back end and I at some point, and for some unknown reason, have turned it on.

I’m running WordPress Multisite and it’s a setting hidden in the Network Settings.

To navigate to it, click on My Sites in the top left corner, and select Network Admin. Then from the next menu select Settings.

secret hiding place for the 10MB upload quota
this little setting on the right… Make sure you turn it off! :)

And that’s it! Once, you clear that little baby, you’ll be able to upload to your little hearts content.

UPDATE: It looks like I wasn’t the only one who’s ever done this!