Not-Noticeably.net

Skip navigation

All posts tagged with "Geekiness"

How to change your WordPress username

Sick of using the name 'admin' to login to your WP installation? Have a user with the login 'PiNkbUnNiEz!1" but want to change it without that user losing all their posts/creating a new account etc.? Tried to do it but found the field disabled in your WP admin panel?
Here is what you need to do.

  1. Before you do anything, backup your database. If you don't know how to do this, ask at the WP forums or Google it - there are some plugins that will do this for you if you don't have access to things like phpMyAdmin (a MySQL tool which can be used to backup your database - Jem has a tutorial on this which may be useful)

  2. Paste this into a file. Name it anything you like, as long as it has a .php extension:

    <?php
    $existing_username = 'admin';
    $new_username = 'MY_NEW_USERNAME';

    // —————

    if (!file_exists('wp-config.php')) exit('Could not find wp-config.php, please make sure you place this file in the same directory as all your WP files.');

    require 'wp-config.php';

    $link = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
    if (!$link) exit('Could not connect to MySQL');
    mysql_select_db(DB_NAME, $link) or exit('Could not connect to MySQL');

    if (mysql_query('UPDATE `' . $table_prefix . "users` SET `user_login` = '" . mysql_real_escape_string($new_username, $link) . "' WHERE `user_login` = '" . mysql_real_escape_string($existing_username, $link) . "' LIMIT 1", $link)) echo 'Username updated, your username is now ' . $new_username . '.';
    else echo 'Could not update your username. MySQL said: ' . mysql_error($link);

    mysql_close($link);
    ?>

    Change the first two lines (excluding the one that says '<?php', obviously :P ) to your existing username (probably admin) and your new desired username. Save the file, then upload it to your WordPress directory. Make sure this file is in the same place as wp-config.php.

  3. Go to the file in your browser, e.g. yoursite/wordpress/the-file.php and voilà! :D

I'm naked!

9th April 2008 / 7:47

9 comments on "I'm naked!"

Tagged: Accessibility, Events, Geekiness, Site

It's CSS Naked Day 2008, so my site has taken its clothes off to boast its web standardiness and stuff. :D

(And yes, the navigation links do appear back to front... I'll explain that another time :P )

Edit: It's the end of CSS Naked Day here in the UK, so the styles are now back up. See you next year!

IE8

8th March 2008 / 17:48

15 comments on "IE8"

Tagged: Browsers, Geekiness, Internet Explorer

So, the first beta of IE8 is out... Looks no different to IE7 but apparently it passed the acid test and it's standards compliant!1!11 WOW!!1! So obviously I had to try it and review it just like I did for IE7.

Well first of all I can't spot any of the old CSS bugs (OMG I can't have been looking properly, seriously) but there are a few general bugs. If you view this site in it, the title of the page or blog entry kind of jumps when you hover over the navigation. Also, dropdown menus can't seem to decide whether they are as wide as the text inside them or as wide as the CSS says they should be. It seems if you click the menu, it is the correct width (i.e. that of the CSS) but if you click inside another field, it goes back to the width of the text inside.

Other than that, I couldn't find anything majorly wrong. I highly doubt I tested it fully, but still: could this be the end of IE hacks and having to make a separate stylesheet for IE because it interprets everything differently? Well, that certainly seems like an exciting prospect. The only thing I wonder is why Microsoft haven't done it before now.

Oh, and it has a handy "emulate IE7" button which is good only really for cross-browser checking... Can't easily install more than one IE on a computer so that's kind of useful. :P

Older Entries | Newer Entries