Showing posts with label web development. Show all posts
Showing posts with label web development. Show all posts

Friday, 26 April 2013

WordPress: manually grant superadmin rights

Network / Super-admin privileges lost after renaming account

This article will explain how to recover lost super-admin / network privileges upon renaming account or how to manually grant super-admin privileges on a WordPress multisite, by updating the database (with phpMyAdmin or any other database gui).

First off you'll need the username of the account in question so you'll head off to "wp_users" table to get it. You can either browse through the list of usernames or run the following MySQL Query:
  • "SELECT * FROM  `wp_users`";
Get the user names ("user_login" value) from table "wp_users"
Get the user names ("user_login" value) from table "wp_users"

Now that you have the user name ("user_login" value) you'll need to add it to the super admins list.
Run the following MySQL Query to get the record responsible for that:

  • "SELECT * FROM `wp_sitemeta` WHERE `meta_key` = 'site_admins'";
You should then see something similar to this:
Grant a user super-admin rights by updating the table "wp_sitemeta"
Grant a user super-admin rights by updating the table "wp_sitemeta"

The value for the "meta_value" field is a jSON formatted array and follows this logic:
  • a:1:{i:0;s:4:"user";}
  • a:2:{i:0;s:5:"admin";s:9:"user_name";}
  • a:3:{i:0;s:8:"almighty";i:1;s:8:"xxxxxxxxx";i:2;s:10:"xxxxxxxxxx";}
where
  • in <a:X>, X is the number of usernames in the array
  • in <i:X>, X is the incremental value in the array (first one is 0, second is 1, so forth)
  • in <s:X:"username">, X is the number or characters in username

Make sure not to add spaces and use the correct upper/lower case value for the username. Also you'll most likely need to log off and then log back into your account for changes to take effect.


Good luck!


http://codex.wordpress.org/Database_Description#Multisite_Table_Overview


Tuesday, 7 February 2012

How can you get more CLICKS than you have PAGE VIEWS?

more CLICKS than PAGE VIEWS

This has been posted on most of my communication channels:
Facebook, Google+, Twitter ...

My posts go like this:

    I may be a bit thick here, but do enlighten me if you can.

    Notice the BLUE (page views) and ORANGE (clicks) graphs in my AdSense account report:
    how can you get more CLICKS than you have PAGE VIEWS?

and here is my Google AdSense report screen:


Now, I have said in the beginning that there might be something I am missing and I don't understand. I am mainly a web developer rather than a marketeer, but I am quite interested in this whole Internet Marketing thing and I do want to learn about it.

So if anyone out there can point me to what it is I am missing, or just explain how AdSense could see this happening, your valuable opinion will be highly appreciated. You don't have to be an SEO, SEM or social media guru to know about this - although I promote myself as one - but I simply can't get my head arount this.

Another thing that makes internet marketing, social media, website optimization and online communication just as interesting as web development. But that's just me, the geeky developer talking :)


search blog

Tricouri Personalizate si Cadouri Haioase - Tu.ro

magazin tricouri