WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» How to Set Default Admin Color Scheme for New Users in WordPress

How to Set Default Admin Color Scheme for New Users in WordPress

Last updated on December 22nd, 2013 by Editorial Staff
46 Shares
Share
Tweet
Share
Pin
Special WordPress Hosting offer for WPBeginner Readers
How to Set Default Admin Color Scheme for New Users in WordPress

One of the most talked about feature of WordPress 3.8 is the new admin interface. It is fully responsive and looks great on all devices. If you don’t like the default colors, then you can choose from 8 different admin color schemes and even add new ones. In this article, we will show you how to set a default admin color scheme in WordPress for new users. We will also show you how to prevent users from changing the default WordPress admin color scheme.

Setting a default color scheme for new users in WordPress

In order to set a default WordPress admin color scheme for new users, all you need to do is add the following code in your theme’s functions.php file or in a site-specific plugin:

function set_default_admin_color($user_id) {
	$args = array(
		'ID' => $user_id,
		'admin_color' => 'sunrise'
	);
	wp_update_user( $args );
}
add_action('user_register', 'set_default_admin_color');

This code changes the default WordPress admin color scheme to Sunrise for each new user who registers on your site. It does not change the color scheme for previously registered users. Also, this code will not stop users from choosing another admin color scheme. Users can still go to their profile section and choose any other color scheme they like.

How to Stop Users From Switching Admin Color Schemes

If you would like to set a default color scheme for your site and do not want users to use any other color scheme, then all you have to do is add the following code in your theme’s functions.php file or in a site-specific plugin:

if ( !current_user_can('manage_options') )
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );

Admin color scheme option removed from user profiles in WordPress

This code will remove the admin color scheme picker from the profile screen of all users except users with administrator privileges.

We hope this article helped you set a default WordPress admin color scheme and disable the color scheme picker from user profiles on your WordPress site.

If you could change the default admin color scheme, which color scheme would you pick? Let us know by leaving a comment below.

46 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • How to Start Your Own Podcast (Step by Step)

    How to Start Your Own Podcast (Step by Step)

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • How to Properly Move Your Blog from WordPress.com to WordPress.org

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

13 Comments

Leave a Reply
  1. Miikey says:
    Jul 10, 2014 at 5:51 am

    Ok I found the solution. So the problem described as followes, if a user is updating his profile e.g. changing his name and click on update the default scheme is loading, because it is marked. As a user you can’t see it, if you using the code above and removes the admin-color- scheme-picker.
    But with this piece of code you can make a color-scheme as default for all none admins. It’s overriding your choosen color-scheme and all is fine.

    Greetz Miikey

    Reply
  2. Miikey says:
    Jul 7, 2014 at 7:02 am

    Found a problem, if a user is updating his profile the standard theme is activated. Can anyone help?

    Reply
  3. Terence Milbourn says:
    Jun 7, 2014 at 7:25 am

    Admin Color Schemes ~ they should be switchable NOT by user but by site. Think how much swearing and shouting that would save!

    Seriously though, what donut thought that making it switchable by user profile was a good idea? I guess there’s some things about WordPress and WP developers I will never understand.

    By the way, if you ever come across a code snippet that I can add to my functions.php and give me a choice of selecting admin color scheme by site, rather than user, I will be forever in your debt.

    Reply
  4. Jessica Yazbek says:
    Apr 5, 2014 at 10:28 pm

    If you want to do this for all existing users, just run the following SQL in your database:

    UPDATE wp_usermeta SET meta_value = ‘sunrise’ WHERE meta_key = ‘admin_color’;

    Obviously change ‘sunrise’ to the color scheme you want to use (and change wp_usermeta to your usermeta table, if that’s not the table name you use).

    Cheers.

    Reply
  5. nick says:
    Dec 26, 2013 at 5:49 pm

    Thanks just what I needed!

    Reply
  6. Elliott Richmond says:
    Dec 26, 2013 at 5:21 am

    You can also take this one step further by changing the colour scheme per role, something I recently wrote a snippet for on WP Snippets til Christmas set the WordPress admin colour scheme for different users and roles

    Reply
  7. mvaneijgen says:
    Dec 25, 2013 at 11:04 am

    Is it possible to do this for all sites in a WordPress Multisite installation?

    Reply
    • Elliott Richmond says:
      Dec 26, 2013 at 5:49 am

      Yes the logic should work the same across the whole network.

      You could take it one step further by checking the blog id first then changing the colour but, it could get more complicated and confusing that way as users can be users of multiple sites but, it still possible by checking which site they were currently logged into I guess.

      Reply
  8. ConnieM says:
    Dec 25, 2013 at 1:13 am

    I would switch to a color scheme which will give more contrast to the text areas in the admin. It is sometimes hard to identify an input field or text-area.
    Unfortunately the new schemes don’t offer that.

    What is disgusting and controverse to your statement that the new admin area looks great on any device is the fact that you get empty squares/boxes (in my case 2!) in the dashboard and users will not stop to ask for what these empty dotted-bordered squares are meant.
    Do you know how to get rid of these empty boxes?????

    Reply
    • Garratt says:
      Jan 8, 2014 at 11:01 am

      Unfortunately with the new update they removed the functionality to customize the dashboard. So those 2 square dotted boxes are where you can drag widgets.

      There used to be an option to change it to 1,2,3,4 columns but now it’s default is 4 columns and it can’t be changed. So if you used to only use 2 widgets on the dashboard in a 2 column layout, it now looks terribad.

      I used to use recent comments and Google analytics stats on the dashboard in 2 column, now I have to add 2 widgets I don’t ever use just to make it look half decent when I log in… litle OCD about it to be honest.

      It’s driving me crazy.

      Hopefully Syed will look into it and post a fix

      Reply
  9. Peter Le says:
    Dec 24, 2013 at 5:44 pm

    I want to keep the default theme, but instead of the blue, have it be green instead.
    How would I go about doing this?

    Reply
    • Elliott Richmond says:
      Dec 26, 2013 at 5:27 am

      You can just change the value of the array in the line that says ‘admin_color’ => ‘sunrise’
      eg change it to one of the following:
      ‘admin_color’ => ‘default’
      ‘admin_color’ => ‘light’
      ‘admin_color’ => ‘blue’
      ‘admin_color’ => ‘coffee’
      ‘admin_color’ => ‘ectoplasm’
      ‘admin_color’ => ‘midnight’
      ‘admin_color’ => ‘ocean’
      ‘admin_color’ => ‘sunrise’

      Not specifically Green but that’s how you change it.

      Reply
      • Garratt says:
        Jan 8, 2014 at 11:05 am

        You missed the question, which was css related.
        He wants the dark grey theme (default – and the darkest color) but instead of the blue highlights and mouse-overs, change them to green.

        Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
SeedProd WordPress Coming Soon Page Plugin
SeedProd
Jump start your website with viral coming soon pages. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 25 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2019 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2019)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2019)
    • SiteGround Reviews from 1032 Users & Our Experts (2019)
    • Bluehost Review from Real Users + Performance Stats (2019)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • 7 Best CRM Software for Small Businesses (Compared)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2019 – Step by Step Guide
Deals & Coupons (view all)
WPEngine
WP Engine Coupon
Get 20% OFF on all WP Engine hosting plans or 4 months free on annual payment.
Visual Composer
Visual Composer Coupon
Get 20% OFF on Visual Composer WordPress page builder plugin.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress

Copyright © 2009 - 2019 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by HostGator | WordPress CDN by MaxCDN | WordPress Security by Sucuri.