Change the Default Gravatar in WordPress

By default, WordPress comes with some basic default user avatar is named “Mystery Person”. In this tutorial, I will explain how to change the default gravatar in WordPress.

If you want to add your brand to default user gravatar for the newly registered user in your website, then keep your close your attention in this post.

Change the Default Gravatar in WordPress

use the below code at the end of your functions.php file. functions.php file is located in wp-content/themes/your-theme-folder/functions.php.. Change the Image path in this line of code $myavatar = 'https://www.freewebmentor.com/default-avatar.png';

After adding the above code login to your WordPress admin panel and navigate to the Settings => Discussion Settings. At the end of this page, you will see a default avatr has been added. see the screenshort.

Change the Default Gravatar in WordPress

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Article Tags: , , , , , ,