Friday, November 27, 2015

How to Show User Registration Date in WordPress

Do you want to show the user registration date in WordPress? Often popular membership sites and forums display the user registration date on profile as “member since 2015”. In this article, we will cover how to show user registration date in WordPress.

Showing a the date of a user's registration in WordPress

Where and How You Want to Show User Registration Date?

Some of you may just want to display a user’s registration date in the admin columns of the Users page. This will give you a quick overview of when a user joined your website and allow you to sort by registration date.

Another usage scenario is to display a user’s registration date on the ‘Edit Profile’ page. This will allow any administrator and the user themselves to see when they joined your website.

Last but probably the most popular usage scenario is when you want to display the user registration date on their public profile on the front-end of your website.

Let’s take a look at how you can do all of them.

Adding Registered Date Column on Users Page in Admin Area

First thing you need to do is install and activate the Admin Columns plugin. Upon activation, you need to visit Settings » Admin Columns to configure the plugin.

Add registered column in users table

Under the admin columns tab, click on users and then click on add column button.

Next select ‘Registered” in the Type drop down menu and click on store updates button.

You can now visit the users screen where you will see a new column labeled ‘Registered’ showing the date when a user registered on your WordPress site.

Users table with registration date column

See what other things you can do to add and customize admin columns in WordPress.

Showing Registration Date Field in User Profile

For showing registration date on the edit profile page, you will need to upload a custom plugin to your website.

Simply create a new file on your computer using a text editor like Notepad and save it as membersince.php on your desktop.

Next open the file and paste the following code inside it.

%1$s
	
%1$s

Member since: %2$s

'; $udata = get_userdata( $user-ID ); $registered = $udata->user_registered; printf( $table, 'Registered', date( "M Y", strtotime( $registered ) ) ); } ?>

Save your file and then upload it to your WordPress site.

Finally you can connect to your WordPress site using a FTP client and then go to /wp-content/plugins/ folder. Select the membersince.php file from your computer and then upload it.

Now you can go to your WordPress plugins page and activate this plugin on your website.

That’s all. Verify everything is working by editing a user profile on in your WordPress admin area, and you will see the user registration date.

Showing member registration date in WordPress user profile

Showing User Registration Date on Your Website

In this method, we will be using a simple shortcode to display any users registration date on the front-end of your WordPress site.

First you will need to add the following code in your theme’s functions.php file or in a site-specific plugin.


function wpb_user_registration_date($atts, $content = null ) { 

$userlogin = shortcode_atts( array(
'user' => FALSE,
), $atts );

$uname = $userlogin['user'];     

if ($uname!== FALSE) {             

$user = get_user_by( 'login', $uname );  
if ($user == false) { 

$message ='Sorry no such user found.'; 


} else { 

$udata = get_userdata( $user-ID );
$registered = $udata->user_registered;

$message =	'Member since: ' . date( "d F Y", strtotime( $registered ) );

}
	
} else { 

$message = 'Please provide a username.'; 

} 

return $message; 

} 

add_shortcode('membersince', 'wpb_user_registration_date');

Next, you can display a user’s registration date by simply using the shortcode like this:

[membersince user=peter]

Replace peter with the username that you want to show.

We hope this article helped you show registration date in WordPress user profiles. You may also want to see our tutorial on how to add additional user profile fields in WordPress registration.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Show User Registration Date in WordPress appeared first on WPBeginner.

Thursday, November 26, 2015

How to Spread The Holiday Spirit with Xmas Widget in WordPress

Do you want to show personalized holiday greetings on your website? One of our users recently asked if there was a way to add a Christmas card in WordPress? We did some research and found an easy solution. In this article, we will show you how to spread the holiday spirit with Xmas Widget in WordPress.

Christmas widget plugin for WordPress

What is Xmas Widget for WordPress?

Xmas Widget is a premium WordPress plugin that allows you to display beautiful holiday greetings on your website. It is fully customizable, and you can add your own greetings, background images, and control animations like snow fall and snow accumulation.

While the name says Xmas Widget, you can display it anywhere on your WordPress site including posts and pages. It is fully responsive, and you can also manually adjust its width if you want to.

Most importantly, it works with all themes and plugins.

Xmas Widget can be used to just simply greet the users, or you can use it to greet and tell users about special offers on your website.

Preview of a christmas greeting

Setting up Xmas Widget in WordPress

First you will need to purchase the Xmas Widget plugin. Prices start from $14.99 with one year of support and updates.

WPBeginner users can get an exclusive 34% OFF by using the coupon code wpbeginner60.

Note: we don’t get any commission if you buy this plugin. We liked the plugin and asked the author to give our users a discount instead.

After you purchase the plugin, you will need to install and activate the Xmas Widget plugin. Upon activation you need to visit Appearance » Widgets page to setup the plugin.

You will notice that the plugin has added a new sidebar called ‘Xmas Widget Hidden Sidebar’, and a new widget labeled Xmas Widget. Simply add Xmas Widget to the sidebar where you want to display holiday greetings.

Widgets page after installing Xmas Widget

You will be asked to provide your plugin license key. After verification, you will be able to see widget options.

Xmas Widget settings

First you need to provide a title for your widget. After that you need to enter your greeting message in the content area. You can use HTML in the content area to add links or format text.

Xmas Widget comes with 15 built-in backgrounds that you can choose from. You can also use your own background colors if you want. There are five choices for text fonts and unlimited colors.

You can also add an icon and adjust its position and appearance. Lastly, you can enable Snow build up and Snow animation option. These options would show snow fall animation on your Xmas widget.

Don’t forget to click on the save button to store your widget settings. You can now visit your website to see the Xmas Widget in action.

Preview of Xmas Widget

Add Xmas Widget in WordPress Posts or Pages

As we mentioned earlier, you can add Xmas widget to your WordPress posts and pages as well. Here is how you can do that.

Simply go to Appearance » Widgets page. Add Xmas Widget to ‘Xmas Widget Hidden Sidebar’.

Now you need to setup the widget options like you did earlier and save your widget settings. At the end of the widget, you will find a shortcode like this:

[xmas id=”3″ width=”250px”]

Copy and paste this shortcode to any WordPress page or post. You can even adjust the width of the greeting message to meet your needs.

Xmas Widget in a WordPress post

That’s all, we hope this article helped you spread the holiday spirit with Xmas Widget on your WordPress site. You may also want to see our guide on how add points system in WordPress to ignite user engagement.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Spread The Holiday Spirit with Xmas Widget in WordPress appeared first on WPBeginner.

Happy Thanksgiving from the Search Engine Watch team

Join us as we set our 'out of office' till Monday 30 November and find the roomiest pair of sweatpants in our wardrobe.

How to Restore a WordPress Site with Just a Database Backup

We always recommend our users to make complete WordPress backups on a regular basis. But what if you unknowingly used one of the free plugins that only make database backups? In this article, we will show you how to restore a WordPress site with just a database backup. It will not be a complete restore, but we will show you how you can minimize the damage.

Recovering a WordPress site from a database backup alone

Getting Started

For the sake of this tutorial, we are assuming that you have your WordPress database backup in a zip file. If you do not have one yet, here is how to make a WordPress database backup manually.

If you are recovering from a bad experience with your web hosting provider, then it is probably the time to find a better host. We have hand picked some of the best WordPress hosting providers. These are the companies that we have worked with and trust with our own projects.

Also see: 7 Key Indicators when you should switch your WordPress hosting.

Preparing to Restore WordPress Database Backup

First, you will need to create a new database. Simply login to your cPanel account and click on MySQL Databases under the Database section.

MySQL databases in cPanel

Next, provide a name for your database and then click on create database button.

Creating new MySQL database

Now that you have created a database, you need a MySQL user who will be assigned all privileges to work on your newly created database.

On the same MySQL databases page, scroll down to MySQL users section and add a new user.

Adding a new MySQL user

Provide a username and a strong password for your database user and then click on create user button.

Next, you need to add this user to the MySQL database. Scroll down to ‘Add user to database’ section and select the user along with the database from the drop down menus and then click on the add button.

Adding a user to database

Your new database is now ready for WordPress.

Importing WordPress Database Backup

First you need to visit the cPanel dashbaord. Under the databases section, you need to click on phpMyAdmin.

Launching phpMyAdmin from cPanel

On then next step, select the database you created earlier on the phpMyAdmin page and then click on the Import button.

Now you need to click on the choose file button to upload your WordPress database backup file. Simply click on the go button at the bottom of the page to start importing.

importdb

You will see a success message when the import job is finished.

You have successfully imported your WordPress database. Now the next step is to install WordPress using your new database.

Restoring Your WordPress Site

For a manual restore of WordPress, you will need to manually install WordPress on your server. Visit our step by step WordPress installation tutorial and jump to the section ‘how to install WordPress using FTP’ for detailed instructions.

During the installation, when you reach ‘create a configuration file’ step. Enter the database name and user you created earlier.

Creating configuration file step during WordPress installation

You will now see a message that WordPress can connect to your database, and you can run the installation now.

Clicking on the install button will now show you the ‘Already Installed’ message.

Already installed message

That’s all you can now proceed to login to your WordPress site.

Restoration Troubleshooting

Since you do not have your old WordPress files, there will be several things missing. Some of them can be easily restored while others will be a bit difficult. We will go through all of them one by one.

1. Theme

Simply install a fresh copy of your old WordPress theme. If you made direct changes to your theme files, then all those changes will be gone.

You will have to go through theme options to set it up the way it was before.

2. Widgets

Widgets play an important role in WordPress themes. Luckily, they are stored in your WordPress database and switching to your old theme will restore some of your widgets.

You can always go to Appearance » Widgets to add and rearrange widgets in your sidebars.

Some WordPress plugins come with their own widgets. In order to use those widgets, you will first need to install and activate those plugins.

3. Permalinks

Your site’s permalink structure is also stored in database, and it will be automatically restored. However, if you are seeing 404 errors on front-end of your site, then you need to refresh permalink settings.

Simply go to Settings » Permalinks and click on the save changes button without changing anything. This will refresh your WordPress url structure.

4. Plugins

WordPress stores a record of your site’s active plugins. When you visit the plugins page for the first time, WordPress will show you a list of errors for each plugin that was in the database but is not installed anymore.

Deactivated plugins

Copy all the plugin names and start installing and activating them one by one.

Recovering Lost Images for your WordPress Site

Finding and replacing lost images on your website would be the trickiest part of the recovery. Depending on how much content and images you have, this can take a long time.

Unfortunately, there is no easy way around it. You will have to use a variety of tools to extract your images from different sources. Your chances of recovering all images are fairly low.

1. Look in Your Browser Caches

If you have recently lost your website, then you can look into your browser cache.

Firefox users can download CacheViewer2 add-on to easily find images from their website stored in browser cache.

Finding cached images in Firefox

You can just right click on an image and select save as from the menu.

Google Chrome users on Windows can try Chrome Cache Viewer.

Google Chrome users on Mac will be out of luck. We were unable to find any reasonable solution to browse, preview, and save image from Google Chrome cache on Mac.

2. Look for Your Images in Web Caches

There are several web services that keep cached versions of websites. You can start by looking for your images in Google’s image search. Simply enter your site’s URL and you will be able to see images Google found on your website.

Finding your images in Google Image search

You can click on an image to see a larger preview and save the image.

If you are restoring a much older site and can’t find images on Google or Bing, then you can try Archive.org. It is a non-profit organization that stores snapshots of websites for historical purposes.

Internet Archive Way Back Machine

Finding and Replacing Images on Your Website

If you did not have much content on your old site, then you can manually replace images in your posts. However, if you have a lot of content then finding and replacing images manually will be difficult.

Here is how you can easily locate broken images and replace them.

First, you need to install and activate the Broken Link Checker plugin. Upon activation, simply go to Tools » Broken Links Checker page. The plugin will show you a list of all broken links on your site.

Find and replace missing images in WordPress

Broken images are also considered broken links, so they will appear in the list as well. You can click on the link text column to sort the broken links list to show images first.

Now you can replace the images that you have recovered by editing posts. For the images that you were not able to recover, you can either try to recreate them or simply unlink them.

Bonus Tip

It will be hard to recover all your lost data. Your site may even show errors and affect user experience. This is why you see many experts strongly urging you to set up automatic backups.

We recommend using BackupBuddy. It is a premium WordPress backup plugin with easy restore options and the ability to automatically create and save your backups on the cloud.

That’s all, we hope this article helped you restore your WordPress site from database backup. You may also want to see our list of 13 vital tips and hacks to protect your WordPress admin area.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Restore a WordPress Site with Just a Database Backup appeared first on WPBeginner.

Are Thanksgiving traditions a relic of the past? A Google Trends investigation

Using Google Trends data, here's a look into what the most popular traditions are and find out just how much things have changed since 1621.

Tuesday, November 24, 2015

Black Friday / Cyber Monday 2015 WordPress Deals – Big Savings

It’s that time of the year again, where we share the best Black Friday and Cyber Monday deals on your favorite WordPress products. This is the best time to buy WordPress plugins, themes, and hosting because all providers usually offer their best deal of the year. To help you locate those deals, we have hand-picked some of the best WordPress Black Friday and Cyber Monday deals for 2015.

Black Friday Deals for WordPress

These offers are for LIMITED TIME only. We’ve indicated the expiration date next to each offer.

Also make sure you bookmark this page because we will be updating it throughout the week as we find new deals.

Get 35% OFF OptinMonster

OptinMonster

OptinMonster is the best plugin for growing your email list. It is created by Syed Balkhi, founder of WPBeginner. We use it on our site and have seen as high as 600% increase in our subscriber growth.

There are tons of other case studies like Yoast doubling his signups and adding 10,000 subscribers in a month and more.

OptinMonster allows you to create beautiful popups, slide-in forms, floating bars, full screen welcome gates, and several other high-converting optin forms. It comes with great features like built-in analytics, A/B testing, exit-intent, smart user and page targeting, and much more.

Use the coupon code: BF2015 to get 35% OFF OptinMonster.

Get 35% Off OptinMonster

This deal is good till December 1, 2015.

Get 35% OFF Envira Gallery

Envira Gallery

Envira Gallery is the best responsive WordPress gallery plugin in the market. Unlike, other gallery plugins which slow down your website, Envira is blazing fast and highly optimized for speed. It is packed with features like Albums, Lightbox, drag and drop builder, gallery templates, full screen slideshows, WooCommerce integration, watermarking, and much more.

Use the coupon code: BF2015 to get 35% OFF on all Envira Gallery plans.

Get 35% Off Envira Gallery

This deal is good till December 1, 2015.

Get 35% OFF Soliloquy

Soliloquy

Soliloquy is the best WordPress slider plugin in the market. It is super-easy to use and packed with great features like carousel, fullscreen sliders, featured content, Instagram, ready to use themes, and much more.

Use the coupon code: BF2015 to get 35% OFF on all Soliloquy plans.

Get 35% Off Soliloquy

This deal is good till December 1, 2015.

Get Over 50% OFF BlueHost

Bluehost 2.95 Special

Bluehost is one of the official WordPress hosting providers. This Black Friday they will be offering amazing discount deals throughout the week.

Get BlueHost Now

This deal is valid from November 27th till December 1, 2015.

Note: Their best deal will be on CyberMonday, where the price goes down even further, and you can get hosting for $2.95 / month.

Get 70% OFF Siteground

Siteground

Siteground is one of the leading WordPress hosting providers. They are offering discount deals upto 70% OFF during black friday and cyber monday deals.

This deal is good from November 27 till November 30, 2015.

Get 70% OFF Siteground

Note: We use Siteground to host our popular List25 site (see case study).

Get 25% OFF Beaver Builder

Beaver Builder

Beaver Builder is the best WordPress page builder plugin in the market. It’s 100% drag-and-drop and makes it really easy for you to customize your site.

Unlike other plugins, it is actually quite fast and easy for beginners to use. In our opinion, it is by far the best option in the market.

This holidays, they’re offering a 25% discount.

Use the coupon code: HAPPYHOLIDAYS

Get 25% OFF BeaverBuilder

Get HostGator for $2.99

HostGator logo

HostGator is one of the most popular web hosting company, and they are the one that we use to host WPBeginner. Our founder, Syed Balkhi, has been a HostGator customer since 2007.

They’re offering WPBeginner users an exclusive hosting deal starting at $2.99 / month.

Use the coupon code: wpbeginner

Get the best HostGator deal in the market

Get Upto 50% OFF iThemes and BackupBuddy

iThemes Toolkit

Our friends over at iThemes are offering 40% off everything on their site. They’re the folks behind BackupBuddy, the best WordPress backup plugin among several other top plugins and themes.

Use the coupon code: JINGLEWP40

Get 40% OFF iThemes Now

Note: If you’re buying their full toolkit which includes everything iThemes make, then you can get 50% off using the coupon code: SAVEBIG50

This offer expires on November 30th, 2015.

Get 30% OFF WPEngine

WPEngine

WPEngine is one of the best managed WordPress hosting service provider. They are offering a 30% discount for initial payments on shared plans.

Use the coupon code: WPECW30

Get 30% OFF WPEngine

Get 25% OFF MaxCDN

MaxCDN

MaxCDN is the industry leader in content delivery network. We use MaxCDN to improve performance of all our websites including WPBeginner (See why you need a CDN Infographic ).

Get MaxCDN Now

Get 40% OFF CSS Hero

CSS Hero

CSS Hero allows you to customize any WordPress theme. See our CSS Hero review and how it makes WordPress design customization easy.

Use Coupon Code: WPBeginner

Get 40% OFF CSS Hero Now

Get 25% OFF Gravity Forms

Gravity Forms

Gravity forms is the best form management solution in WordPress. You can use it to generate leads, accept payments, accept guest posts, and much more. They have a special 25% off discount for WPBeginner users.

Use coupon code: wpbeginner

Get Gravity Forms Now

40% OFF Themify

Themify Home

Themify, a premium WordPress theme company and friends of WPBeginner are offering 40% OFF on all their themes. They are also offering a $100 discount on their life time club memberships. Users can also signup for their iPad giveaway.

Use coupon code: BLACKFRIDAY

Get Themify Now

This deal is good for November 27 to November 30 2015.

Get 40% OFF Headway Themes

Headway Themes

Headway Themes is a premium WordPress theme shop. This season they are offering a 40% discount on all their themes.

Use coupon code: headway40

Get 40% Off Headway Themes Now

This deal is good from November 26 until November 30 2015.

Get 30% OFF AffiliateWP

AffiliateWP

AffiliateWP is one of the best affiliate tracking and management plugin for WordPress. They are offering a 30% discount during cyber weekend.

Use coupon code: BFCM2015

Get AffiliateWP Now

This deal is good from November 27 to November 30 2015.

Get 25% OFF CSSIgniter

CSSIgniter

CSSIgniter is a premium WordPress theme shop that allows you to get access to all of their themes for just $49 per year.

They’re offering a 25% discount this Black Friday bringing their already low prices even lower.

Use the coupon code: BLACKFRIDAY

Get 25% OFF CSSIgniter Now

Note: This offer expires on Nov 30th, 2015.

Get 30% OFF Easy Digital Downloads

Easy Digital Downloads

Easy Digital Downloads is one of the best eCommerce platform for WordPress. They are offering a special 30% discount on all purchases during cyber weekend.

Use coupon code: BFCM2015

Get Easy Digital Downloads

This deal is good from November 27 to November 30 2015.

Get 40% OFF SlideDeck

SlideDeck Web Screenshot

SlideDeck is another popular WordPress slider plugin that’s offering a 40% discount on all plans.

Use the coupon code: SDBF40

Get 40% off SlideDeck

Get 35% OFF ThemeIsle

Themeisle logo

ThemeIsle, a fast growing WordPress theme provider is offering 35% off all their products for Black Friday.

Use the coupon code: TIBF2015

Get 35% OFF ThemeIsle

Get 50% OFF ThemeFurnace

ThemeFurnace

ThemeFurnace, a WordPress theme shop ran by our friend Oliver Dale is offering 50% off on all their WordPress themes.

Use the coupon code: BLACKFRIDAY

Get 50% off ThemeFurance

Note: this offer expires on December 1st.

Get 40% OFF S2Member

s2member

S2Member is one of the most popular WordPress membership plugin. For this black friday, they’re offering 40% off their paid version.

Use the coupon code: BLACK40-A:2655

Get 40% OFF S2Member Now

Note: this offer expires on November 30th.

Get 20% OFF WP Migrate DB Pro

WP Migrate DB Pro

WP Migrate DB Pro is one of the most loved tools by the WordPress developer community because it takes the pain out of moving WordPress databases.

This black friday, they’re offering 20% off discount on the plugin.

No Code is Necessary.

Get 20% OFF WP Migrate DB Pro

Note: Offer expires on November 30th.

Get 50% OFF SEMrush

SEMrush

SEMrush is the best online competitive analysis tool in the market. They are offering an exclusive 50% discount to WPBeginner users.

No code is necessary.

Get 50% OFF SEMrush

Note: Offer expires on November 30th.

Get 50% OFF EventEspresso

Event Espresso

EventEspresso provides an easy way to manage events from your WordPress site. They are offering a whopping 50% discount.

No code is necessary

Get 50% OFF EventEspresso

Note: Offer expires on December 1st.

Get 50% OFF aThemes

aThemes

aThemes is a premium WordPress theme shop. This season they have announced an amazing 50% discount on all their themes.

Use the coupon code: BLACKFRIDAY15

Get 50% OFF aThemes

Note: Offer expires on November 30th.

Get 30% OFF WeDevs

WeDevs Logo

WeDevs is a premium WordPress plugin and theme shop. They are offering a 30% discount on all products except extensions.

Use this coupon code: Thanks30

Get 30% Off WeDevs

Note: Offer expires on November 30th.

******* END Of DEALS *******

That’s all for now. We will be adding more deals and updating this page throughout the week. Aside from these, we also have tons of other deals and discounts for WPBeginner readers.

Hopefully, you can take advantage of some of these limited time deals. Have a happy thanksgiving.

P.S. If you’re a WordPress company offering discount or know of one that is having a deal, then please let us know, so we can update this article.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post Black Friday / Cyber Monday 2015 WordPress Deals – Big Savings appeared first on WPBeginner.