How to Add Dark Mode to Your WordPress Website (Easy)

Do you want to add dark mode to your WordPress site?

By adding a dark mode to WordPress, your website will adapt automatically based on the visitor’s browser preferences. You can also add a dark mode toggle to your site, so visitors can easily switch between dark and light modes.

In this article, we’ll show you how to add dark mode to your WordPress website.

How to add dark mode to your WordPress website

What is Dark Mode and Why Add it to Your Website?

Many modern mobile devices and computers use dark mode to minimize the amount of white light that comes from the screen. This can reduce eye strain, especially in low-light conditions.

Some people even believe that it allows you to use computers and mobile devices late into the night without the white and blue light ruining your sleep.

Some devices come with a built-in night mode that simply uses warmer color tones. However, dark mode actually adds dark colors to the device’s background.

If you have an iPhone or Android smartphone, then you may be able to switch to dark mode using a toggle. Some popular websites like YouTube even offer a built-in dark color scheme.

YouTube's dark mode

On desktop computers, you can visit websites in dark mode by using a Chrome extension such as Night Eye.

Here’s how the WPBeginner website looks using that extension:

An example of a website, with dark mode enabled

By adding a dark mode toggle to your website, users will be able to choose the mode they prefer without having to install a special browser extension.

Many plugins also allow you to customize how dark mode looks on your website, so you don’t have to use the browser or device’s default settings.

You can even add dark mode to your WordPress admin area. This can be useful if you work on your site in the evenings or at night, or if you’re suffering from eye strain.

With that in mind, let’s see how you can add dark mode to your website’s public-facing front-end, and the admin area of your WordPress website.

Tip: Want to use a dark color scheme, even when the visitor’s device is in normal or daytime mode? Then check out our list of the best dark themes for WordPress.

How to Add Dark Mode to Your WordPress Website

The easiest way to create a dark mode for your website is by using Droit Dark Mode. This plugin adds a toggle so visitors can enable dark mode on the front end of your site. It can even add a toggle to the admin area, so you can enable dark mode for the WordPress dashboard.

First, you’ll need to install and activate the Droit Dark Mode plugin. For more details, please see our guide on how to install a WordPress plugin.

Upon activation, go to Droit Dark Mode » Preset Colors and choose how your dark mode will look to visitors. The free version of the plugin comes with two preset colors, so select the color that you want to use.

Adding dark mode to your WordPress website

After that, click on ‘Display Settings’ and select a style for your dark mode switch.

Next, open the Body Position dropdown and choose where the slider will appear on your WordPress blog or website. You’ll typically want to add it to the top of your site so visitors can easily switch between the different modes.

How to change the position of the dark mode switch in WordPress

With the setup out of the way, it’s time to enable dark mode by selecting ‘General Settings.’

To start, you’ll need to activate ‘Enable Front-end Dark mode,’ which will add the switch to your website’s front-end.

Enabling dark mode for your WordPress website

At the moment, WordPress will always load your site in regular, light mode.

If you want to make dark mode the default, then simply click to activate the ‘Enable Default Dark Mode’ switch.

How to make dark mode the default for your WordPress website

With that done, just click on ‘Save Settings.’ Now if you visit your website, you’ll see the new dark mode switch in action.

To enable and disable dark mode, simply give the switch a click.

An example of dark mode in WordPress

Adding Dark Mode to Your WordPress Admin Area

You can change the admin color scheme in WordPress using the built-in settings. However, none of the default color schemes reduce the white light coming from the screen.

If you work late into the evening or suffer from eye strain, then you can try adding a dark mode to the WordPress admin area.

Simply go to Droit Dark Mode » General Settings and click to activate the ‘Enable Backend Dark Mode’ toggle.

Adding dark mode to the WordPress admin area

After that, you can choose a color scheme for the admin dark mode. Just open the new ‘Select Color Palette’ dropdown and select either Color 1 or Color 2.

With that done, click on ‘Save Changes.’

Droit Dark Mode will now add a dark mode toggle to the admin toolbar. To see admin dark mode in action, just click the toggle.

Enabling dark mode for the WordPress admin area

If you’re not happy with how dark mode looks, then open the ‘Select Color Palette’ dropdown and choose a new style from the list.

After that, click on ‘Save Settings’ and use the toggle to see the new colors in action.

Changing how dark mode looks on your WordPress admin dashboard

We hope this article helped you learn how to add dark mode to your WordPress website. You may also want to see our guide on how to create a landing page in WordPress, or see our expert pick of the must have WordPress plugins.

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 Add Dark Mode to Your WordPress Website (Easy) first appeared on WPBeginner.

5 WordPress Experts Give Their Top Tips on WordPress Performance

It’s no secret that when it comes to WordPress, speed matters. Playing a critical role in determining your search rankings and -more importantly- the user experience you deliver, maintaining optimal performance remains a crucial challenge for many WordPress users. Of course, there are countless tools, techniques, and strategies to help you optimize your site for [...]

Read More...

The post <strong>5 WordPress Experts Give Their Top Tips on WordPress Performance</strong> appeared first on Learn WordPress with WPLift.

21 Best Landing Page Themes for WordPress for 2023

Businesses create websites to serve an important function: generate and convert leads. One of the easiest ways to convert more leads through your website is to build it using an appealing WordPress theme. Many WordPress themes are equipped with subscription offers and contact forms, which should improve your conversion rates.  These themes are popularly known [...]

Read More...

The post 21 Best Landing Page Themes for WordPress for 2023 appeared first on Learn WordPress with WPLift.

How to Create and Sell Ebooks in WordPress from Start to Finish

Did you know that you can create an ebook from your WordPress blog posts?

Offering ebook downloads on your WordPress website is a good way to make money online or grow your email list. Writing a book is a big job, but you may discover that you’ve already written enough content for a book on your blog.

In this article, we’ll show you a smart way on how to create an ebook from your WordPress blog posts.

How to Create an Ebook From Your WordPress Blog Posts

Why Create an Ebook From Your WordPress Blog Posts?

If you publish regular blog posts on your WordPress website, then you have a lot of content that you can repurpose or monetize. One of the best ways to repurpose your content is to turn your blog into an ebook.

Writing an ebook can build your site’s credibility. You can use it to grow your email list, offer it as exclusive content on a membership site, or sell it to make money from your blog.

However, writing a book is difficult, and 97% of people who start to write a book never finish.

The good news is that you may have already written a book. Your most popular blog posts may already contain enough quality content to repurpose as a successful ebook. Or you can use your blog to write a new book one post at a time.

With that being said, let’s take a look at how to create an ebook from your WordPress blog posts. Here’s what we’ll cover in this tutorial:

Choosing Which Blog Content to Use in Your Ebook

Your first job is to decide which blog posts should be included in your ebook. If your blog is about a certain topic or niche, then you may just need to find your most popular blog posts. Each post will become a chapter of your ebook.

However, if you wish to create multiple ebooks, then you should choose blog posts that cover more specific topics, such as popular posts in a specific category. You can even consider future ebook ideas when you are planning the content to write about on your blog.

How to Find Your Most Engaging Content to Include in an Ebook

You want to create an ebook that people actually want to read. A good starting point is to find your most engaging and popular blog posts. That way, you already know that your readers are interested in these topics.

If you are not already tracking user engagement on your WordPress blog, then the best way to get started is by using MonsterInsights. It’s the best Analytics plugin for WordPress and helps you configure Google Analytics without writing code.

The MonsterInsights Google Analytics plugin

There’s also a free version of MonsterInsights that you can use as well.

When you install and activate MonsterInsights, you will also set up Google Analytics tracking in WordPress. Once your blog has been tracked for some time, you will be able to view important user engagement metrics such as your most popular content.

You just need to visit the Insights » Reports page in your WordPress admin area and go to the ‘Overview’ report. You can scroll down to see different reports, and you will find your most popular content under the ‘Top Posts/Pages’ section.

Top posts and page report

You’ll find detailed instructions about how to set up and use MonsterInsights in our guide on how to track user engagement in WordPress with Google Analytics.

Now that you know what your most popular posts are, you need to choose which ones to include in your ebook. They should contain evergreen content that will stay fresh and also fit together logically as chapters to form a complete ebook.

Writing a Series of Blog Posts to Create Content for an Ebook

Another way to come up with blog content for an ebook is to write a series of articles on a particular topic. These blog posts can then be compiled into an ebook.

We do something similar on WPBeginner, where we regularly compile a series of posts into a new article. Here are some examples of articles we have compiled with repurposed content from our existing articles:

In fact, whenever you are writing about a complex topic, it is almost always better to write a series of posts that break the topic up into smaller parts.

You can learn more in our guide on how to efficiently manage post series in WordPress.

Quickly Updating the Posts You Choose for Your Ebook

Once you have chosen the blog posts you wish to include in your ebook, take some time to quickly update them if necessary. By doing that now, you will make sure that both the blog post and ebook are free from errors and contain all of the necessary information.

You can start by making sure there are no spelling or grammar errors in the post. Most likely you did this before publishing each post, but it’s worth checking this again in case something was missed.

You can learn the best ways to proofread your posts in our guide on how to check grammar and spelling mistakes in WordPress.

Also, take time to check the comments on each post. They may identify areas where the blog post isn’t clear enough or is missing important information. Take time to address those issues.

Later in this article, you will make further edits that will be needed in the ebook but not the blog posts.

Creating Professional-Looking Cover Art for Your Ebook

One of the best ways to create an ebook that looks professional is to use a well-designed ebook cover. Your readers will actually judge your book by its cover.

You could hire a graphic designer using websites such as 99designs or Fiverr. Or you can use graphic design software or web services to do it yourself even if you don’t have design skills.

Before you create the cover art for your book, make sure you first finalize the ebook title. It should be clear and concise, grab the reader’s attention, and describe what the book is about. You may also want to create a subtitle and book description.

One of the easiest ways to create cover art is with Canva, a free online graphic design tool. It comes with easy-to-use tools that allow you to create a book cover from a template.

The basic Canva account is free and gives you access to dozens of ready-made templates. To get the full power of Canva, you may want to sign up for a Pro account. This lets you upload your own fonts, set your brand colors, and more.

After creating your account, simply type ‘book cover’ into the search box and then click on the ‘Book Cover’ search result.

Searching for Book Cover Templates in Canva

Canva will display a list of thousands of book cover templates. These have the correct width ratio of 1.6 and also a high-quality resolution of 1410 x 2250 pixels.

You can filter the list by clicking the genres at the top of the screen, or by checking one of the styles or themes on the left. This will help you find the most suitable templates quickly.

Filtering the Ebook Cover Templates in Canva

Once you find a template you want to use for your cover art, you should click it to preview it. You will also see whether it is a free, paid, or pro template. After that, you should click the ‘Customize this template’ button.

Canva will now load its drag-and-drop editing interface. You can point and click on any item in the template to edit it. Make sure you type the correct title, subtitle, and author. You can rotate, resize, crop, and delete items.

You can also add more text, icons, shapes, patterns, and backgrounds to your design from the left column. However, you will often get the best result by making simple changes.

Customizing a Book Cover in Canva

When you have finished creating your cover art, you will need to save it to your computer. Simply select File » Download from the menu at the top of the screen.

You can select a variety of file types from the drop-down menu, including PDF, JPG, and PNG. For this tutorial, we will choose PNG and then click the ‘Download’ button.

Downloading a Book Cover in Canva

Method 1: Turning Blog Posts Into an Ebook Using Google Docs (Free)

You can create an ebook from your blog posts using Google Docs. This requires a little more manual work than our second method, but it’s free and makes it easy for you to edit and customize your ebook.

You need to start by creating a new Google Doc and naming it with your ebook’s title.

After that, make sure that under the View menu, ‘Show Print Layout’ is checked. This will allow you to see how each page of your ebook will look.

Inserting Your Ebook Cover Art

The first thing you need to do is insert the cover art you created earlier.

You can either use drag and drop to place it on the first page, or select Insert » Image from the menu and upload it to your computer.

Inserting a Cover Image in Google Docs

Once you’ve done that, you should select Insert » Break » Page break from the menu to start a new page.

Creating a Title Page and Table of Contents

On the new page, you should type the title of your ebook. Before you press enter, make sure you format it as a title by selecting ‘Title’ from the Styles drop-down menu.

Selecting the Title Style in Google Docs

If you wish to center the title, then you need to select Format » Align & Indent » Center.

You can now press the Enter key several times and type the ebook’s subtitle if you have one, as well as your name or your blog’s name as the author.

A Title Page Example in Google Docs

You might like to format them using a larger font and center them. Don’t use a heading style, or these lines will be included in your table of contents. You can also use the enter key to space these lines appropriately down the page.

Once you’re done, you should select Insert » Break » Page break from the menu again to start another new page.

On the next page, you will add the table of contents. Google Docs will populate this with headings as you add content to the document.

Start by typing the heading ‘Table of Contents’ and format it with the Heading 1 style.

Tip: If your text is still being centered, then you will need to select Format » Clear formatting from the menu to return to the default formatting.

Now you can press Enter and select Insert » Table of Contents from the menu. You can choose from a version with page numbers and a version with hyperlinks.

Inserting a Table of Contents in Google Docs

At the moment, the table of contents will be quite empty, but it will be updated as you add blog posts to your ebook.

Pasting the Your Blog Post Contents

Now it’s time to start pasting the content from your blog posts into Google Docs. Before you paste each blog post, make sure you insert a new page break (Insert » Break » Page break) so each ebook chapter starts on a new page.

Then, just head to your WordPress website and navigate to your blog post.

Simply highlight the entire post, copy it to the clipboard, and then paste it into Google Docs. After that, insert another page break and repeat until all the blog posts have been copied.

You may also want to set the title of the posts to Heading 2 in Google Docs so they’re included as chapters in your Table of Contents and document outline.

For our demo ebook, we pasted the contents of 7 blog posts into Google Docs to produce a 167-page ebook. Selecting Tools » Word count from the menu shows that the document contains almost 25,000 words.

Editing Your Ebook Contents

Now you should work through your ebook content and make any changes that are necessary. Some things that work well in a blog post won’t belong in an ebook.

For example, you may need to tweak the title of each blog post so it works better as a chapter heading. And if you added a call to action at the bottom of each blog post, then you may need to remove it from each chapter in your ebook.

You may need to replace references to ‘posts’ with ‘chapters’. Also, you should replace internal links to your blog with links to the chapters in your ebook if they are included.

You should also work on the transitions between chapters so your book flows better, otherwise, it might read like a collection of separate blog posts. You might also want to add a stronger introduction and conclusion to the book.

You might also like to add additional material to the book, such as sections on:

  • How to use this book
  • What you’ll find in this book
  • About the author
  • Contact information
  • Copyright information
  • Disclosures
  • Resources and links
  • Footnotes and sources

Finally, make sure you correct any spelling and grammar errors you find while editing.

Customizing Your Ebook’s Design

Before you export your ebook from Google Docs, consider whether you can improve the design of your ebook.

For example, you can customize the appearance of your headings or normal text.

This is easy to do in Google Docs. You can start by changing the format of a particular heading directly. Just select the font you want, if you want it bold or underlined, or other design choices.

After that, with that text still highlighted, select Heading 1 » Update Heading 1 to match from the drop-down menu to automatically change all other headings to match.

Customizing Heading 1 Style in Google Docs

You can also add a header or footer that includes your ebook title and page numbers.

Just select Insert » Headers & Footers and then click ‘Header’ or ‘Footer’ in the menu. You can set up page numbers by clicking the ‘Options’ menu from the header.

Adding Page Numbers to the Header in Google Docs

When you are happy with the way your ebook is formatted, then it’s time to export it in an ebook format.

Exporting Your Ebook as a PDF

Now that you have finished creating your ebook, you can save it to your computer as a PDF. Simply select File » Download » PDF Document from the menu.

Exporting a Google Doc as a PDF Document

Tip: Before exporting your ebook, we recommend you update the table of contents to include any new chapters you have added. When you click on the table of contents, you will find a button labeled ‘Update table of contents’ at the top.

Google Docs also allows you to download the ebook as an EPUB Publication. This format should be used if you want to make the book available in a marketplace such as Amazon’s Kindle Store.

Method 2: Turning Blog Posts Into an Ebook Using a Plugin

You can also create an ebook from your blog posts using a plugin. MPL-Publisher is the best ebook creator plugin because it covers everything you need to do in an easy-to-use interface.

You will need to use the premium version to export your ebook as a PDF file. This costs $49 per WordPress site and also offers a cover editor and the ability to store the settings for multiple books. The free version can export in EPUB and Microsoft Word formats, and more.

The first thing you need to do is install and activate the MPL-Publisher plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you will need to enter the license key that was emailed to you. Simply navigate to MPL-Publisher » Publish eBook on the admin sidebar, then click on the ‘Premium’ tab. Now you can paste the license key into the field provided.

Entering a Premium License Key in MPL-Publisher

Entering the Book Details

Next, you need to enter some details about your book. Make sure you are looking at the ‘Details’ tab of the MPL-Publisher » Publish eBook page.

From here, you can fill in the book details such as the title, subtitle, author, and description.

Entering the Book Details in MPL-Publisher

Next, you should click on the ‘Meta’ tab where you can enter metadata about the book.

You will find fields where you can fill in the book’s ISBN (or some other unique identifier), language, publication date, publisher name, and copyright information.

Entering the Book Metadata in MPL-Publisher

You can scroll to the bottom of the page and click the ‘Save’ button to store the book details and metadata.

Inserting Your Ebook Cover Art

Now you can move to the ‘Cover’ tab. Here you can add the cover image that you created earlier.

Simply click the ‘Select Image’ button and you will be taken to your site’s Media Library. From there, you can upload the cover art and then click the ‘Select’ button.

Adding Cover Art in MPL-Publisher

If you haven’t already created your cover art, you can use the plugin’s Cover Editor to create a book cover right from the WordPress dashboard. Note that this is one of the plugin’s premium features.

Customizing Your Ebook’s Design

Now you can switch to the plugin’s ‘Design’ tab to choose how your book will be formatted. Several themes are available, and you simply click on the theme you wish to use.

Choosing a Theme in MPL-Publisher

When you scroll down the page, you can choose whether to include the post’s featured images in the ebook and whether to insert or embed the images in the ebook.

Make sure you choose the second or third option. We recommend you avoid the first option, which is to link the images from your website.

Embedding or Inserting Images in MPL-Publisher

Advanced users can also format their books using custom CSS.

Make sure you scroll down and click the ‘Save’ button to store your progress.

Selecting the Posts to Include in Your Ebook

On the left of the screen, you will see a list of posts on your website. To include a post in the ebook, simply click its checkbox.

If you have a lot of posts on your website, then you make it easier to find the posts you wish to include by filtering the list. You will find filters for type, status, category, month, and year.

For this tutorial, we’ll filter the list to include only posts (not pages) that have been published. We’ll also filter the list by the ‘Blogging’ category.

Simply select the desired criteria from the drop-down menus and then click the ‘Filter content’ button.

Filtering Posts in MPL-Publisher

Next to each post, you will see a word count and how long the chapter will take to read.

Once you check the posts you wish to include, you can reorder them by dragging and dropping the hamburger icon. That’s the icon that looks like three horizontal lines.

When creating your ebook, MPL-Publisher will automatically create a table of contents containing these chapters.

Editing Your Ebook Contents

You can edit a post by clicking the ‘Edit’ link that appears under the post when you hover your mouse over it. The changes will be seen in both your ebook and the post on your website.

Editing or Duplicating Posts in MPL-Publisher

If you want to edit the ebook contents only, leaving the post on your website as it is, then you need to click the ‘Duplicate and Edit’ link. This will create a duplicate of the post with the ‘Book Chapter’ custom post type.

Once you update the book chapter, you will need to uncheck the original post, then locate and check the new book chapter you just created. Book chapters display a book icon beside the title.

Identifying the Book Chapter Post Type in MPL-Publisher

If you want to add a new chapter to your book that doesn’t appear on your blog, then you can click the ‘Add New Book Chapter’ button.

This will create a new blank book chapter that will be found only in your book, and not on your blog.

In Method 1 above, we provide a list of additional material you might like to add to your ebook, such as contact information, disclaimers, and more.

Exporting Your Ebook as a PDF

Once you have finished setting up the ebook, you can export it. You need to scroll down to the ‘Output format’ and choose ‘Adobe File (PDF)’ as the file type.

Exporting Posts as a PDF in MPL-Publisher

Alternatively, you could select ‘Microsoft Word (DOCX)’ if you plan to continue editing the book or sending it to a professional editor, or ‘EPUB 3.0’ if you plan to make the book available in an online ebook store.

If you like, you can check the ‘Validate content before download’ box. This ensures that the ebook will not contain HTML errors.

Finally, simply click the ‘Download eBook’ button, and MPL-Publisher will compile your ebook and download it in the format you specified.

How to Promote and Monetize Your eBook in WordPress

Now that you have created an ebook from your blog posts, you need a way to promote it, so more visitors can get your ebook. There are a few ways to do this.

The method you choose depends on your business goal. You can giveaway the ebook for free to raise awareness, use ebook as a lead magnet to get more email subscribers, or sell your ebook to make money online.

1. Allowing Free Ebook Downloads in WordPress

You can offer your ebook as a free download using the WordPress file block.

Simply edit the post or page where you want to add your ebook download and then add a ‘File’ block.

add file block and click on media library

This will allow you to upload the ebook to your site, and it will be displayed in the post in a small PDF viewer by default.

For step-by-step instructions, see Method 1 in our guide on how to add ebook downloads in WordPress.

Tip: Want your visitors to be able to search for your ebook’s content on your website? WordPress doesn’t do this by default, so we wrote a guide on how to add PDF indexing and search in WordPress.

2. Using Ebook Downloads to Get More Subscribers

If you’re using your ebook to grow your email list or capture leads, then you’ll want to make sure your visitors can’t access the ebook until they share their email addresses.

An ebook popup, created using OptinMonster

You can set that up using OptinMonster, the best lead generation plugin for WordPress. We use it on WPBeginner and have increased our conversions by over 600%.

For detailed instructions, see our guide on how to add content upgrades in WordPress.

3. Selling Ebook Downloads in WordPress

Selling digital products like ebooks is one of the best ways to earn money from your WordPress website.

To sell ebooks, you’ll need a plugin like Easy Digital Downloads, one of the best eCommerce WordPress plugins. This beginner-friendly plugin makes it super easy to sell any type of digital product including ebooks.

Once installed and activated, you can easily add new downloads to your website. It’s easy to add a title and description for your ebook, as well as categories and tags.

Adding a download to Easy Digital Downloads

The plugin also handles pricing. You can choose variable pricing with multiple options. You may have one option to sell just the ebook and another that includes an additional product. Using EDD, they will both show on the same product page.

You can also simply set a single price for your ebook purchase.

Creating variable pricing for an ebook in WordPress

After that, you can upload your ebook and add a cover image that will be displayed on your website.

You can find more detailed instructions in Method 3 of our guide on how to add ebook downloads in WordPress.

Bonus Tips to Promote Your Ebook

The easiest way to promote your ebook is to your existing audience. Both email newsletters and push notifications are an excellent way to spread the word about your new ebook launch.

You can use PushEngage to setup push notification for your blog readers. This has among the highest engagement rates.

For email marketing services, we recommend either Constant Contact or Sendinblue since they’re affordable for new users.

Another proven technique you can use to promote your ebook is giveaways. These help you leverage the power of social media to bring more new users to your blog.

We recommend using RafflePress plugin to create a viral giveaway since it seamlessly connects with all major social media platforms.

Adding actions to your Twitch giveaway

We hope this tutorial helped you learn how to create an ebook from your WordPress blog posts. You may also want to learn how to start your own podcast, or check out our comparison of the best WordPress SEO plugins to grow your traffic.

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 Create and Sell Ebooks in WordPress from Start to Finish first appeared on WPBeginner.

How to Limit or Disable Automatic Empty Trash in WordPress

Do you want to change how often your trash is emptied on your WordPress website, or stop WordPress from emptying the trash automatically?

By default, WordPress will automatically delete anything that has been in the trash for 30 days. However, some users might like the trash to be emptied more or less often, or prefer to empty the trash manually.

In this article, we will show you how to limit or disable the trash being automatically emptied in WordPress.

How to Disable Auto Empty Trash in WordPress

What Is Trash in WordPress?

WordPress added a trash feature way back in version 2.9. It works just like the recycle bin or trash on your computer.

In other words, your deleted posts aren’t removed permanently but are sent to the trash instead so they can be recovered for a time. Anyone can delete a post accidentally. That’s why WordPress makes it easy to restore deleted posts and pages.

You can view them by going to Posts » All Posts from your WordPress dashboard and then clicking the ‘Trash’ option.

View trashed posts

Your WordPress website will automatically delete anything in the trash after 30 days so that it doesn’t pile up.

What if you don’t want WordPress to automatically delete items from the trash? Or you’d prefer it to be emptied more or less often than once a month.

Let’s have a look at how you can have it automatically emptied as often as you like. We’ll cover three methods below. The first method is the easiest for most users. You can use the links below to jump to your preferred method.

Method 1: Changing when WordPress Trash Is Emptied with a Plugin

First, you need to install and activate the Change Empty Trash Time plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you should visit the Settings » General page of your admin dashboard. Once there, scroll to the bottom of the page, and you will find a new ‘Time to empty trash (in days)’ setting.

Empty trash can after certain days

Simply type in the number of days that WordPress should take to empty the trash. For example, you can type 1 for daily, 7 for weekly, or 30 for monthly.

If you type 0, then deleted posts and pages will be deleted permanently instead of being placed in the trash.

Note: Be very careful about setting the time to empty to 0. It can be difficult to recover permanently deleted posts and pages. Make sure you’re using a backup plugin, just in case.

Don’t forget to click the ‘Save Changes’ button to store your settings.

Method 2: Changing when WordPress Trash Is Emptied with Code

You can also configure how regularly the trash is emptied by the use of a code snippet. This method is not recommended for beginners, so if you’re not familiar with code, then you should use Method 1 instead.

For this method, you’ll have to edit your wp-config.php file.

If you haven’t edited the wp-config.php file before, then take a look at our guide on how to edit wp-config.php file in WordPress.

You can simply add the following line of code to your wp-config.php file.

define('EMPTY_TRASH_DAYS', 1 ); //Integer is the amount of days

You should paste it near the end of the file, just before the line that says, ‘That’s all, stop editing! Happy blogging.’

Auto trash code in wpconfig

If you leave this code snippet as it is, then your trash will be emptied every day. Feel free to change the number 1 to some other number, and the trash will be emptied after that number of days.

If you don’t wish to use the trash feature at all, then you should set the number to 0. Deleted posts and pages will then be deleted permanently without being placed in the trash.

Make sure you have a backup plugin set up first, just in case you need to restore any accidentally deleted pages.

Don’t forget to save the wp-config.php file once you have made your changes.

Method 3: Stopping WordPress from Automatically Emptying Trash

Do you want to stop WordPress from automatically deleting items from the trash?

Simply add the little code snippet below into your theme’s functions.php file. If you’re not used to editing your core WordPress files, check out our guide on copying and pasting code snippets from the web.

Now, we don’t generally recommend editing your site’s theme files directly. The slightest mistake can break your website. A better way of adding code snippets is by using WPCode.

First, you’ll need to install and activate the free WPCode plugin. For more details, please see our guide on how to install a plugin.

After that, you can go to Code Snippets » + Add Snippet from your WordPress dashboard and then select the ‘Add Your Custom Code (New Snippet) option.

Adding Your Custom Code in WPCode

Next, you will need to enter a title for your code snippet.

Then, copy this snippet and paste it into the box labeled ‘Code Preview.’

function wpb_remove_schedule_delete() {
    remove_action( 'wp_scheduled_delete', 'wp_scheduled_delete' );
}
add_action( 'init', 'wpb_remove_schedule_delete' );

This code simply removes the action that deletes trashed items when their time is up.

Don’t forget to click the ‘Code Type’ dropdown menu and select the ‘PHP Snippet’ option.

Enter a title for code

After that, you can scroll down to the ‘Insertion’ section to view more options, such as how and where you’d like to insert the code.

We recommend using the default options. The plugin will Auto Insert the code and run it everywhere on your site.

Select the default Auto Insert method in WPCode

You can then click the toggle to make your code snippet Active.

Once that’s done, simply click the ‘Save Snippet’ button at the top.

Save and activate code snippet WPCode

Now when you send an item to the trash, it will remain there until you view your trashed files.

From here, you can manually click on the ‘Empty Trash’ button to delete any post.

Click empty trash button

We hope this tutorial helped you learn how to limit or disable automatic empty trash in WordPress. You may also want to learn how to get a free SSL certificate or check out list of must have plugins to grow your site.

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 Limit or Disable Automatic Empty Trash in WordPress first appeared on WPBeginner.

10 Website Marketing Data You Must Track on Every WordPress Site

Are you wondering which marketing data you should be tracking on your WordPress website?

After launching a website, most small business owners rely on their best guesses to make important marketing decisions. Not only does that add huge risk, but it also significantly slows down growth.

In this guide, we will share the top website marketing data that you must track on every WordPress site, so you can make data-driven decisions to grow your business.

Website marketing data you must track on WordPress site

Why Do You Need to Track Marketing Data in WordPress?

We believe it’s easy to double your traffic and sales when you know exactly how people find and use your website. Most business owners do not realize how easy it is to track important marketing metrics on your WordPress site.

For example, with a few clicks, you can find out who your visitors are, where they are coming from, and what they do on your website. You can learn which of your articles are getting more visits and which pages on your site are not getting any views.

If you run an online store, then you can see what’s your website conversion rate, which page drives the most sales, what are your top referral sources, and more.

You can use all this marketing data to make informed business decisions and grow your business with confidence.

That said, let’s take a look at the top website marketing stats that you must track on every WordPress site. You can click the links below to quickly jump to any section you’re interested in:

1. Set Up Google Analytics in WordPress

The best way to track marketing data on your WordPress website is by using Google Analytics. It is the most popular website analytics software in the world and is loved by businesses, bloggers, and marketers because it provides a treasure trove of information.

For example, you can use Google Analytics to learn:

  • The number of visits and pageviews on your website
  • Who is visiting your website (visitor location, browser, operating system, screen size, and more)
  • How they found your website
  • How users interact with your website
  • And a whole lot more

Google Analytics is an essential tool in our own business. However, you’ll need to add a tracking code to your website, which requires editing code. This can be tricky for beginners, and the slightest mistake can mess up your tracking.

An easier way of setting up Google Analytics is using MonsterInsights. It is the best WordPress Analytics plugin and helps you set up advanced tracking in WordPress without editing code.

See our step-by-step tutorial on how to install Google Analytics in WordPress.

Any link that takes users away from your website is called an outbound link. If you use affiliate marketing to make money from your website, then those outbound links are also known as affiliate links.

Tracking these outbound links help you see how much traffic you are sending to other sites, and you can use this data to build stronger partnerships with those sites.

As a blogger, you can see which affiliate links are clicked more often by your visitors. This information can help you make a proper affiliate marketing strategy and boost your referral earnings.

The easiest way to track affiliate links in WordPress is by using MonsterInsights. It tracks outbound links and affiliate links on your site out of the box.

You also get easy-to-understand reports inside your WordPress dashboard, including your top affiliate and outbound links.

Outbound and affiliate links report

For detailed instructions see our guide on how to track outbound links in WordPress.

3. Enhanced Ecommerce Tracking with Google Analytics

If you run an online store, then you need to enable enhanced eCommerce tracking in Google Analytics. This would allow you to track the following customer information on your online store.

  • Shopping behavior of your customers
  • Checkout behavior and tracking the abandoned cart information
  • Product lists performance
  • Uncover top conversion sources
  • Sales performance

Setting up enhanced eCommerce tracking on your WordPress store can be difficult. However, MonsterInsights makes it easy for you and it literally takes a few clicks to configure with no coding needed.

It works seamlessly with the best eCommerce plugins for WordPress, like WooCommerce, Easy Digital Downloads, LifterLMS, MemberPress, and more.

The best part is that you get to see eCommerce reports in your dashboard. It shows how your online store is performing, which products are getting the most sales, where your customers are coming from, and more at a glance.

Ecommerce report in MonsterInsights

For details, see our guide on how to enable customer tracking in WooCommerce with Google Analytics.

4. Track User Engagement Data with Google Analytics

User engagement shows you what users do when they arrive on your website. It helps you identify patterns of highly engaged user behavior which leads to more conversions and sales.

For example, you may find out that users visiting a specific page are 10 times more likely to make a purchase. You can then use this insight to send more users to that page, or replicate a similar experience on other pages of your website.

Basically, you will be tracking data about how users interact with your website. For example:

  • Tracking your most popular content
  • Form submission tracking
  • Ecommerce tracking
  • Ads tracking to understand how users interact with ads on your website
  • Monitoring engaged users
  • Time users spend on your website

For detailed instructions, follow our step-by-step guide on how to track user engagement in WordPress.

Google Analytics is really good at tracking where your website traffic comes from. It can even categorize your traffic based on their source, including organic search, organic social, referral, email, and more.

However, when you’re running paid ad campaigns, email marketing campaigns, or social media promotions, you need detailed campaign tracking.

That’s where UTM tracking comes in.

Campaign-level tracking allows you to see exactly which email, ad, or specific call-to-action link helped you get the most traffic or sales.

To make it easy for you to generate UTM links, MonsterInsights comes with a free campaign URL builder, so you can get more detailed reports. You can enter custom campaign parameters like the source, medium, campaign name, and more to create a custom URL.

Build a URL

These tags include native analytics parameters which are tracked by Google Analytics and are included in your reports. You can then see exactly which link users clicked and how your campaigns are performing.

6. Track and Improve Facebook Retargeting Campaigns

Did you know that Facebook allows you to display targeted ads to people who have visited your website in the past? Yes, it’s called retargeting.

You can install a Facebook pixel and display targeted ads to anyone who visits your website. However, if you install Facebook retargeting pixel today, then you will only be able to show your ads to people who visited today and onward.

Even if you are not running a Facebook advertising campaign right now, we recommend installing the retargeting pixel, so you have a built-in audience when you’re ready to get started.

For detailed instructions, see our guide on how to install Facebook remarketing/retargeting pixel in WordPress.

7. Tracking Google AdSense Campaigns

If you run pay-per-click (PPC) campaigns using Google AdSense, then you can easily see how your ads are performing in the AdSense dashboard. However, these reports only tell you how users interact with your ads not what they do after that.

For that, you’ll need Google Analytics which comes with built-in integration with your AdSense account. This integration enables you to easily track your paid traffic conversions.

Select your AdSense property

You can see our guide on how to properly add Google AdSense to your WordPress site.

8. Monitor Your Site with Google Search Console

Google Search Console is a set of free tools offered by Google to give publishers a look at how their website is seen by the search engine.

It provides immensely useful information like how your pages rank for different keywords (more on this later), the overall performance of your site in search engines, and any errors Google crawler found on your website.

Keeping an eye on Google Search Console can help you boost your site’s search engine visibility. To learn more, see our guide on tips for using Google Search Console to grow your traffic.

For example, here is a report showing errors that occur when a user views the site on their mobile devices. Without Google Search Console, it will be very difficult to pinpoint such issues and quickly resolve them.

Mobile errors in search console

For detailed instructions, see our guide on how to add your WordPress site to Google Search Console.

9. Track Your Keyword Rankings

Keywords are the phrases users enter in search engines to find what they’re looking for. To get more traffic from search engines, you need to know exactly which keywords are bringing you the most traffic to your website, so you can focus on what’s working.

We have a complete WordPress SEO guide that you can use to learn how to optimize your content for specific keywords.

Normally, beginners rely on manually entering keywords in Google search to see if their site is ranking. This is highly inefficient as you would miss out on thousands of keywords where your site can be easily ranked.

Google Search Console is a free tool that provides you with valuable keyword data with the average position. You can see which search terms are ranking high, search impressions, and how many average clicks you get.

If you’re using MonsterInsights, then you can view the Search Console report inside your WordPress dashboard.

Search console report

However, it only allows you to see your own site’s keyword data. If you want to research your competitors, then you’ll need SEMRush. This incredibly powerful SEO tool allows you to view in-depth keyword data for any website.

For more on this topic, please take a look at our guide on how to track keyword rankings for your WordPress site.

10. Track Your Email List Growth and Performance

Most popular email marketing services come with stats and insights that you can track. These reports provide useful data like open rate, click-through rate, unsubscribe rate, and more.

You can also see the traffic coming from your email campaigns to your website in your Google Analytics 4 reports under Acquisition » Traffic acquisition.

From here, you can see how well your email newsletter traffic converts, and what you can do to improve.

View email reports in GA4

Tracking email marketing data helps you grow your email list. You can create new email forms, change form placements, and use popups to boost subscribers.

While there are definitely other marketing metrics that you can track, we believe these are the top marketing data that every business owner must track on their WordPress site.

We hope this article helped you track the right website marketing data on all your WordPress sites. You may also want to see our step-by-step guide to boost WordPress speed and performance, and our comparison of the best business phone services for small business.

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 10 Website Marketing Data You Must Track on Every WordPress Site first appeared on WPBeginner.

7 Best Chatbots for Your WordPress Website in 2023

After creating a WordPress website, you might think your work is over. But in reality, it’s not. Because visitors have many questions regardless of the size & type of your website, they usually avoid digging around and prefer getting their questions answered quickly. If you want your website to survive & thrive, you need to [...]

Read More...

The post 7 Best Chatbots for Your WordPress Website in 2023 appeared first on Learn WordPress with WPLift.

YayExtra Review: Give Your Customers Extra Options for Product Personalization

Picture this: You’re shopping for a smartphone cover and stumble across a beautiful online shop. This shop has the cover for your specific smartphone model, but it’s only in one color—yellow—and has no design. You prefer to have it in red and feature a quote, but don’t see an option to personalize the product. And [...]

Read More...

The post <strong>YayExtra Review: Give Your Customers Extra Options for Product Personalization</strong> appeared first on Learn WordPress with WPLift.

How to Prevent Fraud and Fake Orders in WooCommerce

Do you want to prevent fraud and fake orders on your WooCommerce store?

Fraud and fake orders can cause serious losses for an online store. Luckily, there are effective tools to prevent spam and block fraudulent orders.

In this article, we’ll show you how to easily prevent fraud and fake orders in WooCommerce.

blocking fake and fraudulent orders in WooCommerce

Why Do You need to Prevent Fraud and Fake Orders in WooCommerce?

Fraudulent and fake orders can cause serious financial losses to a business. This is why you need to monitor your online store and prevent fraud and fake orders.

Last year, online stores lost more than $20 billion in revenue due to fraudulent payments, chargebacks, and fake orders.

For some eCommerce stores, the total fraudulent order costs were higher than 4% of total revenue.

A large number of fake orders are usually spam that can be easily prevented. Some orders are more malicious and are placed just to annoy or harass an online business.

The rest of the fraudulent orders are scammers trying to make a few quick bucks.

That being said, let’s take a look at how to prevent fraud and fake orders in WooCommerce.

Here is a quick overview of all the tips we’ll cover in this guide.

1. Use a WooCommerce Fraud Prevention Plugin

The easiest way to prevent fraudulent and fake orders in WooCommerce is by using an anti-fraud plugin.

First, you need to install and activate the WooCommerce Anti-Fraud plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit WooCommerce » Settings page and switch to the Anti-Fraud tab.

Anti-Fraud settings

From here, you can set a minimum and high-risk threshold score.

Below that, you can change the order status based on the risk score. For instance, you can set the score when an order will be automatically canceled and set a score to put an order on hold.

Change order status score

Don’t forget to click on the ‘Save Changes’ button to store your settings.

Next, you need to switch to the Rules tab. From here, you can configure the rules and assign them a risk score.

For instance, you can set a 5-point score for a customer who is placing their first order.

Rules to calculate risk score

You can set scores for suspicious IP addresses, emails, unsafe countries, matching IP addresses to geographic locations, and more.

Carefully review the rules and their assigned scores and make changes if necessary. If you are unsure, then default settings would work for most eCommerce websites.

If you are using PayPal as a payment option on your store, then you can switch to the PayPal tab. From here, you can require users to verify their PayPal email addresses.

Ask users to veriify their PayPal email

The plugin also allows you to connect with third-party fraud detection service Maxmind.

This paid service uses a global database to collect data about suspicious payment details, emails, IP addresses, and more.

You can then add this score to your plugin risk score and choose what to do when this score is higher.

MinFraud settings

Once you are satisfied with your settings, don’t forget to click on the ‘Save Changes’ button to store them.

Viewing Fraud Detection Activity

The plugin comes with an easier dashboard where you can see plugin activity in an easy-to-understand format.

Simply click on the Anti Fraud menu item in your WordPress admin sidebar. From here, you can see statistics about all your orders.

View fraud detection activity on your store

The anti-fraud plugin will help you catch most of the fake and fraudulent orders on your WooCommerce store.

However, if you need more strict measures then continue reading for additional WooCommerce fraud prevention tips.

2. Use Stripe Radar and 3D Secure to Automatically Block Fraud

Stripe is the most popular online payment solution in the world. There is a WooCommerce Stripe gateway by FunnelKit that helps you properly connect WooCommerce with Stripe, so you can take advantage of SCA as well as 3D Secure payments option by default.

This method would require you to use Stripe as your main payment gateway in WooCommerce. First you’ll need to install and activate the Stripe for WooCommerce plugin by FunnelKit. Once that’s configured, it will guide you to set up Apple Pay, Google Pay, and other settings to help you protect against fraud transactions.

Aside from that, Stripe also offers a feature called Stripe Radar to help fight against fraudulent transactions. This is a powerful set of algorithm that reduces chargeback risks for your business.

Basically Stripe uses machine learning to block orders. Their machine learning is trained on data across millions of companies worldwide that use Stripe.

We use Stripe Radar on our own eCommerce websites to help reduce fake and fraudulent orders.

Aside from their machine learning algorithm, you can also set custom rules with allow and block lists, and more.

Stripe Radar Rules

Unfortunately not all WooCommerce gateways have these robust features. If you’re looking to switch to Stripe, then we recommend talking with FunnelKit team as they’re WooCommerce experts who can help.

3. Using the Cash on Delivery Payment Option Carefully

In many countries, ‘Cash on Delivery’ is a popular payment option. However, these stores find themselves more vulnerable to fake and fraudulent orders.

Users are able to place an order with a fake address, refuse to accept the order, or cancel an order that is already shipped.

Once you have shipped an order, you will pay out of pocket for shipping and return of that package.

We recommend not using the ‘Cash on Delivery’ option when possible, as that can lower the number of fake orders you may get.

Try to offer alternate payment options for users to pay before you can ship the order.

4. Sell in Specific Countries

WooCommerce allows you to easily restrict orders from specific countries. This helps you prevent fake orders from countries where you don’t sell or ship to.

Simply go to the WooCommerce » Settings page and select the countries you want to sell / ship to under the General tab.

WooCommerce sell in countries

You can also restrict certain WooCommerce products to specific countries in WooCommerce as well.

Note: Geographical restrictions may reduce fake orders but users can simply use VPN to change their location and provide fake information to place an order.

5. Require Users to Create an Account

Another useful trick to slow down and prevent fake orders is by requiring users to create an account before they can checkout.

Simply go to WooCommerce » Settings page and switch to the Account and Privacy tab. From here, you need to uncheck the box next to the ‘Allow customers to place orders without an account’ option.

Require users to create an account

Below that, you can check options that allow users to create an account during checkout or from the My Account page.

Asking users to create an account also allows you to easily block customers who placed fraudulent or fake orders.

6. Use a Web Application Firewall and Custom Rules

Many scammers use disposable email addresses, fake IP addresses, and dummy data to place spam or fake orders.

A WordPress firewall helps you block this before it even reaches your website.

We recommend using either Sucuri or Cloudflare, both are among the best WordPress firewall plugin on the market. They comes with powerful security features, CDN servers, and a malware removal service.

How website firewall blocks attacks

In Cloudflare, you can also setup custom page rules to trigger CAPTCHA, or even automatically block users with suspicious activity. We use Cloudflare enterprise on our larger eCommerce stores which comes with all bots anomaly detection and threat response.

If you’re running a large eCommerce store, then it’s worthwhile exploring Cloudflare Enterprise tools.

7. Require Customers to Verify Their Email Addresses

Another way to reduce fake orders and fraudulent activity is by requiring new customers to create an account and then require them to verify their email addresses.

Simply install and activate the Email Verification for WooCommerce plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit the WooCommerce » Settings page and switch to the Email Verification tab.

Require email verification

From here, you can configure the plugin settings to your own requirements.

For instance, you can switch to the Email tab and delay the default WooCommerce new user email until the user verifies their account.

Delay welcome email

Don’t forget to click on the ‘Save Changes’ button to store your settings.

The plugin will now send a verification email to new WooCommerce customers to verify their email addresses.

Verify your email address

It’s important to make sure that if you’re setting up email verification that your WooCommerce store actually have reliable email deliverability. Otherwise this can block real customers from purchasing your products.

We recommend using WP Mail SMTP along with SendLayer to improve your WooCommerce email delivery rates. Over 3 million websites use the WP Mail SMTP plugin to fix WooCommerce not sending email issue.

There’s also a free version of WP Mail SMTP that you can use as well.

We hope this article helped you prevent fraud and fake orders in WooCommerce. You may also want to see our complete WordPress security guide to make your online store more secure or take a look at our expert pick of the best WooCommerce plugins to grow your store.

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 Prevent Fraud and Fake Orders in WooCommerce first appeared on WPBeginner.

YaySwatches Review: Give Your WooCommerce Products an Extra Edge

Does your WooCommerce product showcase consist of items with different attributes? Then you should consider using variation swatches to ensure you aren’t leaving any gaps in the customer experience. These elements help store owners attract more customers with color options and images.  A customer might want to see your product from a different angle before [...]

Read More...

The post <strong>YaySwatches Review: Give Your WooCommerce Products an Extra Edge</strong> appeared first on Learn WordPress with WPLift.