Tag: tutorials

  • WordPress Custom Fields 101: Tips, Tricks, and Hacks

    Are you looking to make the most of custom fields on your WordPress website?

    Custom fields are a handy WordPress feature that allows you to add extra data and information to your WordPress posts and pages. A lot of popular WordPress plugins and themes use custom fields to store important data.

    In this article, we will show you how to use WordPress custom fields with some tips, tricks, and hacks.

    WordPress custom fields 101 tips tricks and hacks

    Since this is a long article, we have added a table of contents for easier navigation. Just use the quick links below to jump to the section you want to read:

    What Are WordPress Custom Fields?

    WordPress custom fields are metadata used to add extra information to the post or page you are editing.

    By default, when you write a new post, page, or any other content type, WordPress saves that content in two different parts.

    The first part is the body of your content that you add using the WordPress content editor.

    The second part is the information about that content. For example, the title, author, date, time, and more. This information is called metadata.

    A WordPress website automatically adds all the required metadata to each post or page you create. You can also create and store your own metadata by using custom fields.

    By default, the custom fields option is hidden on the post edit screen. To view it, you need to click on the three-dot menu in the top-right corner of the screen and select ‘Preferences’ from the menu.

    Open preferences in content editor

    This will open a popup where you need to switch to the ‘Panels’ tab and then enable the ‘Custom fields’ option.

    After that, simply click on the ‘Enable & Reload’ button to reload the post editor.

    Enable custom fields option

    The post editor will reload, and you will be able to see the Custom Fields panel below the content editor.

    Custom fields can be used to add any information related to the post, page, or other content type. This meta information can then be displayed in your theme.

    View custom fields in WordPress

    However, to do that, you will need to edit your WordPress theme files.

    Note: This tutorial is recommended for users who are already familiar with editing theme files. It is also helpful for aspiring WordPress developers who want to learn how to properly use custom fields in their own themes or plugins.

    Having said that, let’s take a look at how to add and use custom fields in WordPress.

    Adding Custom Fields in WordPress

    First, you need to open a post or page in the block editor so that you can add custom fields. Then, you must go to the Custom Fields meta box.

    Adding custom field name and value

    Next, you need to provide a Name for your custom field and then enter its Value. Click on the ‘Add Custom Field’ button to save it.

    The field will be stored and displayed in the Custom Fields meta box like this:

    View newly created custom field

    You can edit this custom field any time you want and then just click on the ‘Update’ button to save your changes. You can also delete it if you don’t want to use it anymore.

    Now, you need to save your post to store your custom field settings.

    Displaying Custom Fields in WordPress Themes

    To display your custom field on your website, you will need to edit your WordPress theme files and code snippets.

    We don’t recommend directly editing the theme files because the slightest mistake can break your website. An easier way to do this is by using WPCode.

    It is the best code snippet plugin for WordPress that lets you add custom code and manage snippets from your WordPress dashboard.

    If you haven’t done this before, then we also recommend reading our guide on how to copy and paste code in WordPress.

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

    Upon activation, you will need to go to Code Snippets » + Add Snippet from the WordPress dashboard and select the ‘Add Your Custom Code (New Snippet)’ option.

    Adding a code snippet to your WordPress website

    Now you need to copy this code to add to your theme files:

    <?php echo get_post_meta($post->ID, 'key', true); ?>
    

    Don’t forget to replace key with the name of your custom field.

    Next, you must enter the code into the ‘Code Preview’ area and change the Code Type to ‘PHP Snippet’.

    Enter custom fields code

    For example, we used this code in our demo theme:

    <p>Today's Mood: <?php echo get_post_meta($post->ID, 'Mood', true); ?></p>
    

    From here, you can scroll down to the Insertion section.

    Here, you can select where the code will run. By default, WPCode will Auto Insert the code and run it everywhere on your website.

    Edit insertion method for code

    However, you can change this and select where you would like the custom field to appear.

    For example, we will choose the ‘Page Specific’ tab and select the ‘Insert Before Post’ option. This way, the custom field will appear at the beginning of the blog post.

    Insert before post

    You can now save your changes and visit the post where you added the custom field to see it in action.

    You can use this custom field in all your other WordPress blog posts as well.

    Displaying custom field

    You can also easily adjust the custom field for different blog posts. Simply create a new post or edit an existing one.

    Then, go to the Custom Fields meta box and select your custom field from the dropdown menu and enter its Value.

    Reuse custom field

    Once you are done, simply click the ‘Add Custom Field’ button to save your changes and then publish or update your post.

    Troubleshooting: Can’t Find Custom Field in Dropdown on Post Edit Screen

    By default, WordPress only loads 30 custom fields in the dropdown menu on the post edit screen.

    If you are using WordPress themes and plugins that already use custom fields, then those might appear first in the dropdown menu, and you won’t be able to see your newly-created custom field.

    To fix this issue, you will need to add the following code to your theme’s functions.php file or by using WPCode (recommended):

    add_filter( 'postmeta_form_limit', 'meta_limit_increase' );
    function meta_limit_increase( $limit ) {
        return 50;
    }
    

    The above code will change that limit to 50. If you still can’t see your custom field, then you can try increasing that limit even further.

    Creating a User Interface for Custom Fields Using Advanced Custom Fields

    As you can see, once you add a custom field, you will have to select the field and enter its value each time you write a post.

    If you have many WordPress custom fields or multiple authors writing on your website, then this is not an ideal solution.

    Wouldn’t it be nice if you could create a user interface where users can fill in a form to add values to your custom fields?

    In fact, this is what so many popular WordPress plugins already do.

    For example, the SEO title and meta description box inside the popular All in One SEO plugin is a custom meta box:

    AIOSEO SEO title and description

    The easiest way to create a user interface for adding custom fields is by using the Advanced Custom Fields plugin.

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

    Upon activation, you need to visit the ACF » Field Groups page and click on the ‘Add New’ button.

    Add new field group

    A field group is like a container with a set of custom fields. It allows you to add multiple panels of custom fields.

    Now, you need to provide a title for your field group and click the ‘+ Add Field’ button in the top-right corner.

    Add new field

    You can now select a field type.

    Advanced Custom Fields allows you to create all sorts of fields, including text, image upload, number, dropdown, checkboxes, and more.

    Select field type and other details

    Next, you can scroll down to see other options for that particular field, like field name, field label, and default value. You can change them to your own requirements.

    You can also add multiple fields to your field group if you want. Once you are finished, just click on the ‘Save Changes’ button.

    View new field group

    Next, edit a post or create a new one, and you will see a new panel with your WordPress custom fields below the content editor.

    For detailed step-by-step instructions, you can see our guide on how to add custom meta boxes in WordPress posts and post types.

    How to Hide Empty Custom Fields With Conditional Statements

    So far, we have covered how to create a custom field and display it in your theme.

    Now let’s see how to check that the custom field is not empty before displaying it. To do that, we will modify our code to first check if the field has data in it:

    <?php 
    
    $mood = get_post_meta($post->ID, 'Mood', true);
    
    if ($mood) { ?>
    
    <p>Today's Mood: <? echo $mood; ?></p>
    
    <?php 
    
    } else {
    // do nothing;
    }
    
    ?>
    

    Don’t forget to replace Mood with your own custom field name.

    Adding Multiple Values to a Custom Field

    Custom fields can be reused in the same post to add multiple values. You just need to select the field again and add another value to the ‘Value’ box.

    Adding multiple values to a custom field

    However, the code we have used in the above examples will only be able to show a single value.

    To display all values of a custom field, we need to modify the code and make it return the data in an array. You will need to add the following code to your theme file:

    <?php 
    $mood = get_post_meta($post->ID, 'Mood', false);
    if( count( $mood ) != 0 ) { ?>
    <p>Today's Mood:</p>
    <ul>
    <?php foreach($mood as $mood) {
                echo '<li>'.$mood.'</li>';
                }
                ?>
    </ul>
    <?php 
    } else { 
    // do nothing; 
    }
    ?>
    

    Again, don’t forget to replace Mood with your own custom field name.

    In this example, you will notice that we have changed the last parameter of get_post_meta function to false. This parameter defines whether the function should return a single value or not. Setting it to false allows it to return the data as an array, which we then displayed in a foreach loop.

    How to Search Posts by Custom Field in WordPress

    WordPress’s default search doesn’t work with any custom fields on your website. It only uses the content to find the post you or your visitors are looking for on your site.

    However, SearchWP changes that by improving your WordPress search. It’s the best WordPress search plugin that goes beyond using the post content and indexes everything, including WordPress custom fields, PDF documents, custom tables, text, files, and more.

    You can adjust the search algorithm without editing code using SearchWP. Simply install the plugin and then head over to SearchWP » Algorithm from your WordPress admin area.

    After that, you need to go to the ‘Engines’ tab and then adjust the Attribute Relevance slider. This will change the importance given to each attribute during a search.

    Adjust the search relevance

    For instance, you can set the Custom Fields slider to maximum and adjust sliders for other attributes accordingly. This way, SearchWP will give preference to data in custom fields when searching for content in WordPress.

    Another advantage of using SearchWP is that works with some of the most popular custom field plugins, including Advanced Custom Fields (ACF), Meta Box, and Pods.

    For more details, you can read our beginner-friendly guide on how to improve WordPress search with SearchWP.

    Displaying Posts With a Specific Custom Key

    WordPress allows you to display posts with custom keys and their values. For example, if you are trying to create a custom archive page to display all posts with specific custom keys, then you can use the WP_Query class to query posts matching those fields.

    You can use the following code as a starting point:

    $args = array(
        'meta_key'   => 'Mood',
        'meta_value' => 'Happy'
    );
    $the_query = new WP_Query( $args );
     
    <?php 
    // the query
    $the_query = new WP_Query( $args ); ?>
     
    <?php if ( $the_query->have_posts() ) : ?>
     
        <!-- the loop -->
        <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
            <h2><?php the_title(); ?></h2>
            <?php the_content(); ?>
     
        <?php endwhile; ?>
        <!-- end of the loop -->
     
        <!-- pagination here -->
     
        <?php wp_reset_postdata(); ?>
     
    <?php else : ?>
        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
    <?php endif; ?>
    

    Don’t forget to replace meta_key and meta_value parameters with your own values.

    How to Add Guest Author Name Using Custom Fields

    Do you want to add a guest post but don’t want to add a new user profile just for that post? An easier method is adding a guest author name as a custom field.

    To do this, you will need to add the following code to your theme’s functions.php file or use WPCode (recommended):

    add_filter( 'the_author', 'guest_author_name' );
    add_filter( 'get_the_author_display_name', 'guest_author_name' );
    function guest_author_name( $name ) {
    global $post;
    $author = get_post_meta( $post->ID, 'guest-author', true );
    if ( $author )
    $name = $author;
    return $name;
    }
    

    For more details, please see our guide on pasting snippets from the web into WordPress.

    This code hooks a function to the_author and get_the_author_display_name filters in WordPress.

    The function first checks for the guest author’s name. If it exists, then it replaces the author’s name with the guest author’s name.

    Now you will need to edit the post where you want to display the guest author’s name. Go to the Custom Fields meta box, add your guest author name, and finally click on the ‘Add Custom Field’ button.

    Guest author custom field

    For more details, see our article on how to rewrite guest author names with custom fields in WordPress.

    How to Display Contributors to an Article Using Custom Fields

    On many popular blogs and news sites, many authors contribute to writing a single article. However, WordPress only allows a single author to be associated with a post.

    One way to solve this problem is by using the Co-Authors Plus plugin. To learn more, see our guide on how to add multiple authors to a WordPress post.

    Another method is adding contributors as a custom field.

    First, you need to edit the post where you want to display co-authors or contributors. Then, scroll down to the Custom Fields meta box and add author names as co-author custom fields.

    Add coauthor custom fields

    Now, you need to add this code to your theme files where you want to show co-authors:

    <?php 
     
    $coauthors = get_post_meta($post->ID, 'co-author', false);
    if( count( $coauthors ) != 0 ) { ?>
    <ul class="coauthors">
    <li>Contributors</li>
    <?php foreach($coauthors as $coauthors) { ?>
               <?php echo '<li>'.$coauthors.'</li>' ;
                }
                ?>
    </ul>
    <?php 
    } else { 
    // do nothing; 
    }
    ?>
    

    To display author names separated by commas, you can add the following custom CSS:

    .coauthors ul { 
    display:inline;
    }
    .coauthors li { 
    display:inline;
    list-style:none;
    }
    .coauthors li:after { 
    content:","
    }
    .coauthors li:last-child:after {
        content: "";
    }
    .coauthors li:first-child:after {
        content: ":";
    }
    

    This is how it looked on our demo site.

    Coauthors custom fields preview

    How to Display Custom Fields Outside the Loop in WordPress

    What if you need to show custom fields in the sidebar of a single post?

    To display the custom fields outside the WordPress loop, you can add the following code to your theme files:

    <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    echo get_post_meta($postid, 'key', true);
    wp_reset_query();
    ?>
    

    Don’t forget to replace key with your custom field name.

    Display a Custom Header, Footer, Sidebar Using Custom Fields

    Usually, most WordPress themes use the same header, footer, and sidebar on all pages.

    There are also many ways to show different sidebars, headers, or footers for different pages on your website. You can see our guide on how to display a different sidebar for each WordPress post or page.

    One way to do this is by using custom fields. Just edit the post or page where you want to show a different sidebar and then add the sidebar as a custom field.

    Add sidebar custom field

    Now you need to edit your WordPress theme file, such as single.php, where you want to display a custom sidebar. You will be looking for the following code:

    <?php get_sidebar(); ?>
    

    Replace this line with the following code:

    <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    $sidebar = get_post_meta($postid, "sidebar", true);
    get_sidebar($sidebar);
    wp_reset_query();
    ?>
    

    This code simply looks for the sidebar custom field and then displays it in your theme. For example, if you add webpage as your sidebar custom field, then the code will look for a sidebar-webpage.php file to display.

    You will need to create the sidebar-webpage.php file in your theme folder. You can copy the code from your theme’s sidebar.php file as a starting point.

    Manipulating RSS feed Content With Custom Fields

    Want to display additional metadata or content to your RSS feed users? Using custom fields you can manipulate your WordPress RSS feed and add custom content into your feeds.

    First, you need to add the following code to your theme’s functions.php file or use WPCode (recommended):

    function wpbeginner_postrss($content) {
    global $wp_query;
    $postid = $wp_query->post->ID;
    $coolcustom = get_post_meta($postid, 'coolcustom', true);
    if(is_feed()) {
    if($coolcustom !== '') {
    $content = $content."<br /><br /><div>".$coolcustom."</div>
    ";
    }
    else {
    $content = $content;
    }
    }
    return $content;
    }
    add_filter('the_excerpt_rss', 'wpbeginner_postrss');
    add_filter('the_content', 'wpbeginner_postrss');
    

    Now, just create a custom field called ‘coolcustom’ and add any value you like. You can use it to display advertisements, images, text, or anything you want.

    For more details, please see our guide on how to copy and paste code from the web into WordPress.

    How to Manipulate RSS Feed Title With Custom Fields

    Sometimes you may want to add extra text to a post title for RSS feed users. For example, this can be handy if you are publishing a sponsored post or a guest post.

    First, you need to add the following code to your theme’s functions.php file or use WPCode to add the custom code snippet without breaking your website:

    function wpbeginner_titlerss($content) {
    global $wp_query;
    $postid = $wp_query->post->ID;
    $gpost = get_post_meta($postid, 'guest_post', true);
    $spost = get_post_meta($postid, 'sponsored_post', true);
    
    if($gpost !== '') {
    $content = 'Guest Post: '.$content;
    }
    elseif ($spost !== ''){
    $content = 'Sponsored Post: '.$content;
    }
    else {
    $content = $content;
    }
    return $content;
    }
    add_filter('the_title_rss', 'wpbeginner_titlerss');
    

    Next, you need to edit the post where you want to display the extra text in the title field.

    Then, add guest_post and sponsored_post as custom fields.

    Add guest post custom field

    If either of these two custom fields is found with a value “true”, then the code will add the appropriate text before the title. This technique can be used in many ways to fit whatever you like.

    Want to learn more cool RSS feed hacks? See our guide on how to add content and manipulate your WordPress RSS feeds.

    How to Set Expiration Date for Posts in WordPress Using Custom Fields

    Want to set an expiration date for some posts on your WordPress site? This comes in handy when you want to publish content only for a specific period like running surveys or limited-time offers.

    One way to do this is by manually removing the post content or by using a plugin like Post Expirator.

    Another option is using custom fields to automatically expire posts after a specific time. You will need to edit your theme files and modify the WordPress loop like this:

    <?php
    if (have_posts()) :
    while (have_posts()) : the_post();
    $expirationtime = get_post_meta($post->ID, "expiration", false);
    if( count( $expirationtime ) != '' ) {
    if (is_array($expirationtime)) {
    $expirestring = implode($expirationtime);
    }
    
    $secondsbetween = strtotime($expirestring)-time();
    if ( $secondsbetween >= 0 ) {
    echo 'This post will expire on ' .$expirestring.'';
    the_content();
    } else {
    echo "Sorry this post expired!"
    }
    } else {
    the_content();
    }
    endwhile;
    endif;
    ?>
    

    Note: You will need to edit this code to match your theme.

    After adding this code, you can add the expiration custom field to the post you want to expire. Make sure you add the time in this format mm/dd/yyyy 00:00:00.

    Adding an expiration date using custom field

    How to Style Individual Posts Using Custom Fields

    Want to change the look of an individual post using CSS? WordPress automatically assigns each post its own class, which you can use to add custom CSS.

    However, by using custom fields, you can add your own custom classes and then use them to style posts differently.

    First, you need to edit a post that you would like to style differently. Go to the Custom Fields box and add the post-class custom field.

    Post class custom field

    Next, you need to edit your WordPress theme files and add this code at the beginning of the WordPress loop:

    <?php $custom_values = get_post_meta($post->ID, 'post-class'); ?>
    

    Now you need to find the line with the post_class() function.

    Here is how it looked in our demo theme:

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    

    You must change this line to include your custom field value, like this:

    <article id="post-<?php the_ID(); ?>" <?php post_class($custom_values); ?>>
    

    Now if you examine the post’s source code using the Inspect tool, then you will see your custom field CSS class added to the post-class.

    Post class preview

    You can now can use this CSS class to add custom CSS and style your post differently.

    We hope this article helped you learn more about WordPress custom fields. You may also want to see our guide on how to add custom meta fields to custom taxonomies in WordPress and the best WordPress page builder plugins to help you design your website the way you want.

    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 WordPress Custom Fields 101: Tips, Tricks, and Hacks first appeared on WPBeginner.

    Go to source

  • How to Add Express Checkout Buttons in WooCommerce

    Are you looking to add an express checkout button to your online store?

    Express checkout helps streamline the checkout process and improves the overall shopping experience for your customers. It can also boost conversions and reduce cart abandonment.

    In this article, we will show you how to add express checkout buttons in WooCommerce.

    How to add express checkout buttons in WooCommerce

    Why Add Express Checkout in WooCommerce?

    Adding express checkout to your WooCommerce store provides a better shopping experience for your customers.

    It allows customers to go directly to the payment page and skip the shopping cart or checkout pages. They also won’t have to go to a payment provider page or fill out a checkout form to complete their purchases.

    Express checkout buttons make the entire buying process quicker. Customers can simply click the buttons and log in to pay for the products they wish to buy in an instant. As a result, you may see a boost in conversions and fewer abandoned carts.

    Adding express checkout also helps mobile users where their screen sizes are small. Customers will just tap the buttons to quickly purchase the products.

    However, WooCommerce doesn’t offer an express checkout option by default. You will need to use a WooCommerce plugin to add the feature to your online store.

    That said, let’s see how you can add express checkout buttons in WooCommerce.

    Setting Up FunnelKit on Your WooCommerce Store

    FunnelKit is the best WooCommerce sales funnel plugin on the market. It lets you add express checkout buttons and create different funnel pages for your online store.

    The best thing about using the plugin is that it works with Stripe, Apple Pay, Google Pay, PayPal Express, Amazon Pay, and other payment gateways for express checkout. This way, you don’t have to add each payment provider to your online store using third-party plugins or extensions.

    FunnelKit also provides user-friendly templates and lets you do A/B testing. You can easily customize your funnels using different drag-and-drop page builders. Plus, there are multiple pre-built templates and automation features for your marketing campaigns.

    FunnelKit

    Note: For this tutorial, we will be using the FunnelKit Pro plugin because it includes premium templates and more customization options. You can also use the free Funnel Builder for WordPress by FunnelKit plugin to add express checkout buttons in WooCommerce.

    First, you will need to install and activate the FunnelKit plugin. If you need help, then you can follow our guide on how to install a WordPress plugin.

    Upon activation, you will see the FunnelKit setup wizard. Go ahead and click the ‘Get Started’ button.

    Start FunnelKit setup wizard

    After that, you will need to enter your license key. You can find the key in the FunnelKit account area.

    Simply click the ‘Activate’ button after entering the license key.

    Enter FunnelKit license key

    Next, FunnelKit will ask you to install essential plugins. These include WooCommerce, Stripe, FunnelKit Automations, and FunnelKit Cart.

    The best part is that you just have to click the ‘Install and Activate’ button, and FunnelKit will take care of the rest.

    Install essential plugins

    After the plugins are active, the final step is to enter your email address.

    Once that’s done, simply click the ‘Submit & Finish’ button.

    Enter email and finish setup

    You will now see a success message. You are ready to create funnels using the plugin and add express checkout buttons to your WooCommerce store.

    Go ahead and click the ‘Go to Funnels’ button to continue.

    Close the congratulations message

    Enabling Payment Gateways in WooCommerce

    Before moving forward, make sure you have set up at least one payment service in your WooCommerce store.

    To do that, simply go to WooCommerce » Settings from your WordPress dashboard and click on the ‘Payments’ tab.

    Enable payment services in WooCommerce

    After that, you can click the toggle to enable the payment gateway of your choice and click the ‘Finish set up’ button to complete the configuration.

    To learn more, you can follow our guide on how to allow users to choose payment methods in WooCommerce.

    Adding Express Checkout Buttons to WooCommerce

    Once you have enabled your preferred payment gateways, you can head to the FunnelKit » Store Checkout page from your WordPress admin panel.

    From here, simply click the ‘Create Store Checkout’ button.

    Create store checkout

    On the next screen, FunnelKit will show you professionally-designed templates for your checkout page. It will also let you create a checkout page from scratch.

    However, we recommend using a template and quickly customizing it according to your requirements.

    Simply hover over a template you’d like to use and click the ‘Preview’ button.

    Previewing FunnelKit's WooCommerce templates

    For this tutorial, we will use the Livewire template.

    Next, go ahead and click the ‘Import This Funnel’ button at the top.

    Import the funnel template

    Depending on the template you use, FunnelKit may ask you to install additional plugins like Elementor to edit the checkout page.

    Next, you will need to enter a name for your store checkout and click the ‘Add’ button.

    Enter a name for your checkout page

    After that, you will see all the steps that are included in the template.

    You can simply click the ‘Edit’ button for the Checkout page to continue.

    Edit the checkout page

    Next, you can switch to the ‘Optimizations’ tab. From here, simply enable the ‘Express Checkout Buttons’ option.

    FunnelKit will also let you choose the position of the buttons from the following options:

    • Top of the checkout page
    • Before/after the product switcher
    • Before/after the order summary
    • Above the payment gateways
    Enable express checkout

    When you are done, simply click the ‘Save Changes’ button.

    That’s it, you have successfully added express checkout buttons to your online store.

    If you want to edit the appearance of the checkout page, then you can switch to the ‘Design’ tab and click the ‘Edit Template’ button.

    Edit the template

    You can learn more by following our guide on how to customize the WooCommerce checkout page.

    Once you have made your changes, simply visit your online store to view the express checkout buttons in action.

    Express checkout buttons preview

    Additionally, FunnelKit helps you upsell products in WooCommerce. This way, you can boost sales by encouraging users to buy more products.

    You can also set up automated emails in WooCommerce using FunnelKit Automations, a sister product of FunnelKit. This plugin lets you create automated workflows and send email campaigns to customers.

    We hope this article helped you learn about how to add express checkout buttons in WooCommerce. You may also want to see our list of the best WooCommerce plugins for your store and how to create a WooCommerce popup to increase sales.

    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 Express Checkout Buttons in WooCommerce first appeared on WPBeginner.

    Go to source

  • How to Setup Cloudflare Free CDN in WordPress (Step by Step)

    Do you want to use the free Cloudflare CDN on your WordPress site?

    Cloudflare is one of the best WordPress CDN services available in the market. They offer a free CDN that speeds up your website along with a suite of powerful security features for small business websites.

    The challenge is that many entry-level users are not able to use Cloudflare because they think it is hard to set up.

    In this guide, we will walk you through a complete Cloudflare setup in WordPress to help you improve your website speed.

    How to Setup Cloudflare Free CDN in WordPress (Step by Step)

    What Is a CDN?

    A CDN or content delivery network is a system of distributed servers that helps deliver your website files faster to users based on their location.

    Typically, a web hosting service serves your website visitors from a single location. All the users access the same server, no matter where they are located.

    This can cause a delay in content delivery for users living further away from your website’s central hosting server.

    That’s why CDNs set up multiple edge servers in different locations around the globe.

    These CDN servers cache static content from your website’s origin server and present it to users when they visit your WordPress website.

    Content Delivery Network (CDN)

    When there is a user request, the CDN server closest to the user’s location will handle it.

    For example, if someone in the USA wants to access a UK-hosted website, then a CDN server in the USA will serve that request, not the main server in the UK.

    With a CDN, all the user requests are handled by the nearest CDN servers. This reduces the physical distance between the visitors and your website’s server.

    As a result, a CDN improves your website performance and speed for all users regardless of their geographic location.

    A faster website also improves the user experience and can give your website a slight boost in SEO rankings. Using a CDN also reduces the load on your primary server and protects it from crashing during traffic spikes.

    If you want to learn more, then see our guide on why you need a CDN for your WordPress blog.

    What Is Cloudflare CDN?

    Cloudflare CDN

    Cloudflare is one of the most popular free CDN providers available on the internet. It is a large network of globally-distributed servers that automatically cache static content and deliver dynamic content quickly.

    On top of a CDN service, Cloudflare is also a cloud-based website firewall and a distributed proxy server. It monitors all incoming traffic to your website and blocks suspicious traffic even before it reaches your server.

    They offer a free basic plan that’s suitable for small business websites and blogs. They also offer paid plans starting at $20 per month.

    Cloudflare is an excellent choice for small businesses looking for a free CDN. However, if you want to fully utilize all of Cloudflare’s features, then you will need the Business plan, which costs $200 per month.

    Note: We do not use Cloudflare on WPBeginner. Instead, we use Sucuri as a website firewall and CDN. This firewall has the double benefit of improving speed and security. You can learn more in our comparison of Sucuri vs. Cloudflare.

    With that being said, let’s take a look at how to set up Cloudflare Free CDN in WordPress. You can use the quick links below to jump to the different parts of the tutorial:

    Setting Up Cloudflare CDN in WordPress

    To begin, you need to visit the Cloudflare website and click on the ‘Sign Up’ button.

    Visit Cloudflare website

    On the next page, you need to enter your email address and password to create a Cloudflare account.

    Simply enter the information required, and then click on the ‘Sign up’ button.

    Create Cloudflare account

    When you finish signing up, you will see a thank you page confirming that your Cloudflare account has been set up.

    The next step is to add your website to Cloudflare. You should click the ‘Add a website or application’ button to get started.

    The Cloudflare Thank You Page

    You can now enter your website into the ‘Enter your site’ field.

    Make sure you only type your site’s domain name, such as example.com. You don’t need to type the full URL or any extra characters.

    Enter Your Website's Domain Name

    On the next screen, you will be asked to choose the type of Cloudflare plan you want.

    For this tutorial, we will choose the free Cloudflare plan. Then, click the ‘Continue’ button.

    Select Cloudflare free plan

    After that, Cloudflare will show you a list of all DNS records their systems found. These will include your subdomains as well.

    The DNS records you want to be passed through Cloudflare should have an orange cloud icon. The DNS records that will bypass Cloudflare will have a gray cloud icon.

    You need to review the list to make sure that your primary domain is active on Cloudflare with an orange cloud icon. Simply click the ‘Proxy status’ toggle to change the status.

    Verify DNS Records to Set up Cloudflare

    Once you have verified your DNS records, just click on the ‘Continue’ button at the bottom.

    During the next step of your setup, Cloudflare will ask you to update your nameservers. You will be asked to change your nameservers and point them to Cloudflare nameservers.

    Change to Cloudflare nameservers

    Note: Changing nameservers can take some time to propagate throughout the internet. During this time, your website may become inaccessible to some users.

    You can change nameservers from your domain registrar account, like Domain.com.

    Or, if you got a free domain from your web hosting provider like Bluehost, then you will have to change the name server by logging in to your hosting account.

    For the sake of this tutorial, we will be showing you how to change the nameservers from the Bluehost control panel.

    While the process is similar across hosting companies, you can always ask your hosting provider for detailed instructions for their control panel.

    Once you are logged in to your Bluehost cPanel dashboard, go to the ‘Domains’ section, and select your domain name. After that, click on the ‘Name Servers’ tab and the ‘Edit’ button.

    Edit nameservers in hosting cPanel

    Next, you need to select ‘Custom’ and enter the nameservers provided by Cloudflare.

    Then, click the ‘Save’ button.

    Save new Cloudflare nameservers

    After that, you need to go back to the Cloudflare setup page, and click the ‘Done, check nameservers’ button to finish the setup.

    It will now check your new nameservers automatically.

    Check Cloudflare nameservers

    That’s it! It will take a few minutes to update your domain nameservers and activate Cloudflare.

    Once activated, you will see the success message in your Cloudflare dashboard.

    Cloudflare success message

    In the meantime, the Cloudflare Quick Start Guide will open automatically, and you can use it to customize your Cloudflare settings. We will show you how in the next section.

    Note: The above screenshots show the Bluehost control panel. Your nameserver settings may look different if you are using a different hosting provider.

    Configuring Cloudflare With the Quick Start Guide

    The Cloudflare Quick Start Guide should have opened automatically after you clicked on the ‘Done, check nameservers’ button above. This setup wizard will help you improve the security and performance of your website.

    The first setting is ‘Automatic HTTPS Rewrites’.

    Cloudflare Automatic HTTPS Rewrites

    This will help you avoid the mixed content error in WordPress. It does this by automatically changing ‘http’ to ‘https’ in the URLs of all resources and links on your site that can be served with a secure ‘https’ URL.

    This setting is on by default. We recommend you leave it on and click the ‘Save’ button.

    The next setting is ‘Always Use HTTPS’.

    Always Use HTTPS

    Some users have reported issues when using this setting with Cloudflare. This setting is disabled by default, and we recommend you leave it that way. We will show you how to redirect from HTTP to HTTPS using the All in One SEO plugin later in this article.

    Now you can click the ‘Save’ button to move on to the next option.

    The next setting is Brotli compression.

    Brotli Compression

    Cloudflare can use Brotli compression to unlock 15-20% speed improvements. This setting is on by default, and we recommend you leave it on.

    Make sure you click the ‘Save’ button to store this setting.

    Now you will see a summary of what you have configured with the Quick Start Guide.

    Cloudflare Quick Start Summary

    You should see:

    • Automatic HTTPS Rewrites: ON
    • Always Use HTTPS: OFF
    • Brotli: ON

    You have now completed the Quick Start Guide and can click the ‘Finish’ button. However, there are still some additional important settings that need to be configured.

    Configuring Additional Important Cloudflare Settings

    Your basic Cloudflare setup is complete, but there are a few essential settings you need to configure to keep your WordPress site secure.

    1. Secure Your WordPress Login Page

    You can set up page rules to customize how Cloudflare works on specific pages on your site. This is especially useful for securing critical pages such as the login page and wp-admin area.

    The Cloudflare free account allows you to set up 3 page rules. If you want to add more page rules, then you need to pay $5 per month for 5 extra rules.

    First, you need to click the ‘Rules’ option in the menu on the left of the page. After that, you can click the ‘Create Page Rule’ button.

    Cloudflare Page Rules

    Now you can set up 3 different page rules. You can start by creating a rule that secures your WordPress login page.

    Simply add the following settings below to secure your website:

    • Page URL: example.com/wp-login.php*
    • Settings: Security Level – High
    Secure WordPress login page

    When you are done, just click ‘Save and Deploy’ to store and activate the rule.

    2. Exclude the WordPress Dashboard from Cloudflare

    You will be returned to the Page Rules page, where you can see your first rule listed.

    Now you can create a second rule to exclude the WordPress dashboard from Cloudflare caching and enable high security.

    Click the Create Page Rule Button

    You’ll need to click on the ‘Create New Rule’ button to create your second rule.

    After that, you need to type the following settings into the rule. You can click the ‘+ Add a Setting’ button to add new rows for additional settings:

    • Page URL: example.com/wp-admin*
    • Settings: Security Level – High
    • Cache Level – Bypass
    • Disable Performance
    • Disable Apps
    Exclude WordPress dashboard

    When you are done, make sure you click ‘Save and Deploy’ to add the new rule.

    3. Configure SSL Certificate Settings

    Another important setting is the SSL certificate available in the ‘SSL/TLS’ menu on the left.

    Set SSL certificate settings

    Make sure to click the ‘Full’ radio button if you are already using SSL.

    If you don’t have an SSL certificate, then see our guide on how to get a free SSL certificate for your website.

    Once you are done, Cloudflare will provide the essential green padlock in your visitors’ address bar to signify that your website is secure.

    4. Redirect from HTTP to HTTPS Using All in One SEO

    We mentioned earlier that we don’t recommend using Cloudflare’s ‘Always Use HTTPS’ feature. A great alternative is to use the All in One SEO plugin. It’s the best SEO plugin for WordPress, used by over 3 million sites.

    The first thing you need to do is activate and install the All in One SEO plugin. For more details, see our guide on how to install a WordPress plugin.

    After that, navigate to All in One SEO » General Settings and then enter your license key into the ‘License Key’ box and click ‘Connect’.

    Enter AIOSEO license key

    You can find your license key in your account profile on the All in One SEO website.

    Next, navigate to All in One SEO » Redirects and then click the ‘Full Site Redirects’ menu navigation option.

    AIOSEO Full Site Redirect

    You will need to scroll down the page until you find the ‘Canonical Settings’ toggle. You should click this toggle so that it turns blue.

    Next, turn on the ‘Redirect from HTTP to HTTPS’ toggle. This will create a redirect from HTTP to HTTPS, making sure that your visitors always have a secure connection to your website.

    Using AIOSEO to Force HTTPS

    When you are done, make sure to click the ‘Save Changes’ button at the bottom or top of the screen to store this setting.

    Optimizing Cloudflare for WordPress Using a Plugin

    Cloudflare offers a dedicated WordPress plugin for one-click WordPress-optimized settings.

    The plugin lets you quickly set up Cloudflare on your WordPress site, add web application firewall (WAF) rulesets, automatically purge the cache, and more.

    To get started, install and activate the Cloudflare plugin on your website. For more details, see our step-by-step guide on how to install a WordPress plugin.

    Once done, you need to visit Settings » Cloudflare in your admin panel to configure the Cloudflare settings.

    On the settings page, you will see a ‘Create Your Free Account’ button and a sign-in option for existing accounts. Simply click the ‘Sign in here’ link.

    Cloudflare plugin settings

    On the next screen, you will need to enter your Cloudflare email and API key.

    Click the ‘Get your API key from here’ link.

    Entering API Credentials Into the Cloudflare Plugin

    This will bring up a popup for your account area on the Cloudflare website.

    Make sure you are on your ‘My Profile’ page, and then click on the ‘API Tokens’ tab in the left sidebar.

    After that, go to the ‘Global API Key’ section and click on the ‘View’ button.

    Get global API key

    This will open a popup and display your API key.

    Simply click on the key to copy it.

    Click to Copy the Global API Key

    Next, you need to come back to your WordPress dashboard and enter your email address and API key.

    Then, click the ‘Save API Credentials’ button.

    Save Cloudflare API Credentials in WordPress

    After that, the Cloudflare settings will appear on your dashboard.

    From here, you can apply a single-click WordPress optimization, purge the cache, enable automatic cache, and more.

    To optimize your WordPress site, just click the ‘Apply’ button next to ‘Apply Default Settings’.

    Apply to optimize WordPress

    Next, click on the ‘Settings’ menu option.

    Here you will find more site optimization settings.

    Cloudflare for WordPress Settings

    You can scroll down on this screen to find the ‘Security’ section.

    By default, the security level is medium. To improve your website’s security, you can select ‘High’ from the dropdown list.

    Change WordPress security level

    We hope this article helped you to learn how to set up Cloudflare free CDN in WordPress. You may also want to see our ultimate WordPress security guide and our expert picks for the best WordPress security plugins to further protect your website.

    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 Setup Cloudflare Free CDN in WordPress (Step by Step) first appeared on WPBeginner.

    Go to source

  • Introducing New Ultra Smush: 5x Image Compression Boost With Minimal Quality Loss

    WPMU DEV’s award-winning image optimization plugin’s new Ultra Smush unlocks unprecedented image compression levels up to 5x greater than Super Smush, while retaining impressive image quality!

    Is your WordPress site filled with images? Do you want those images to load on your pages faster than a lamborghini speeding on the Autobahn and compress them tighter than a full stack developer’s schedule? And do all this with almost no discernible loss of image quality?

    Then it’s time to activate Ultra Smush.

    In this article:

    Let’s get straight into what really matters…

    5x More Savings? Here Are The Results

    Before we get into how to activate and use the new Ultra Smush image compression level and why it can deliver even more impressive results than our already impressive Super Smush feature, let’s share some of the results of using Ultra Smush.

    First, here are the results of performing a bulk smush on a test site with 1,000+ large-ish images with only Super Smush activated (CDN, Local WebP, and Lazy Load are inactive)…

    Image compression savings using Super Smush.
    Before Ultra Smush: Image compression savings using Super Smush only.

    After activating Ultra Smush, we then ran the test again to see if we could squeeze anything more out of an already image-optimized site.

    And it did! Ultra Smush squeezed out more than 5x times savings…

    Bulk Smush test results using Smush's Ultra mode
    After Ultra Smush: More than 5x times savings on an already optimized site!

    Early testers reported getting similar results.

    Super Smush vs Ultra Smush
    Results: Super Smush (Before) vs Ultra Smush (After)

    And here are just some of the comments we received from early testers about Ultra Smush’s impact on image quality:

    • “Ultra is awesome. It was hard to find the difference between qualities. Quality loss is negligible. I am impressed!”
    • “It looks pretty good, only if I look really close I can see that some of the colors are not as vibrant, and that some edges are not as sharp as on the original.”
    • “On a medium size image with lots of details, you gotta look very close to see slight color saturation differences. On a big image with a solid but gradient background, transitions between gradients are more visible and the main object seems lees sharp. You really need to look very close and expect it. Though it’s not for a photo site that requires superb quality. All in all: pretty impressive.”

    Our plugin development team also did extensive testing, comparing Ultra Smush’s results with Ewww image optimizer and TinyPNG by running DSSIM tests (a quality comparison metric that shows variation from the original image – the lower the score, the better).

    Ultra Smush outperformed the competition in most tests and came out the overall winner for both compression savings…

    Ultra Smush tests - Average File Size Reduction
    File Size Reduction testing shows that Ultra Smush is the clear winner!

    …and image quality (lower DSSIM values = better image quality).

    Ultra Smush tests - Average DSSIM Value
    DSSIM testing shows Ultra Smush delivers superior image savings and better quality over the competition.

    To be clear, using Ultra Smush will result in Lossy compression, so while you should not expect the original quality, the results will still be ultra-impressive.

    How To Enable Smush’s Ultra Mode

    Ultra Smush is not just a new feature, it’s an entirely  new compression level for Bulk Smushing images.

    Ultra mode is a feature of Smush Pro that replaces the Super Smush toggle on the free version of the plugin with additional “Smush Mode” options.

    Switching to Ultra mode is ultra easy. If you have Smush Pro installed on your site, simply navigate to the Bulk Smush Settings screen and select Ultra (Higher Compression)by clicking on the button, then save your settings.

    Choose the level of compression for bulk smushing images that best suits your needs.

    Smush Mode offers three compression levels for Bulk Smush settings:

    • Basic – Choose this option for minimal file size reduction (low savings),  pixel-perfect lossless compression of original image quality, and negligible impact on speed.
    • Super – For faster page loads, select this setting for substantial file size reduction with excellent image clarity. Super Smush provides up to 2x compression savings for your images (lossy compression).
    • Ultra – Select this compression option for professional-grade performance compression. Ultra Smush provides compression levels up to 5x greater than Super, while preserving impressive image quality.

    After enabling Ultra Smush in your plugin settings, you can monitor results from The Hub’s Performance tab.

    The Hub: Performance Tab - Ultra Smush
    View Ultra Smush optimization results inside The Hub.

    Notes:

    • If you would rather continue optimizing images using the Basic (lossless) or Super Smush settings, just select those Compression Level options instead.
    • If you enable Ultra Smush on a site where Smush is already running, remember to re-check all images and perform a new Bulk Smush to benefit from further optimization savings.
    Bulk Smush - Recheck Images
    After enabling Ultra Smush, rerun Bulk Smush to optimize your site even further.

    How Does Ultra Smush Compare To Super Smush?

    While Super Smush provides up to 2x faster image optimization with virtually no visible loss in quality, Ultra Smush’s new compression engine offers up to 5 times file size reduction to achieve exceptional compression results.

    Note: Currently, Ultra Smush improves JPEG images only. Features to improve PNG images will be added in future versions of the plugin.

    To learn more about Ultra Smush, refer to the Smush plugin documentation.

    Why Image Compression Is A Big Deal

    If you are just getting started with WordPress optimization, then it’s important to know that using image compression on websites offers several significant benefits that enhance overall user experience and site performance, such as:

    Faster Loading Speeds

    Compressed images are smaller in size, which means they take less time to load when someone visits your WordPress website. Faster loading speeds improve user satisfaction and reduce bounce rates. Additionally, page loading speed is a crucial factor for SEO, as search engines tend to prioritize faster-loading websites in their search results.

    Improved User Experience

    When images load quickly, users are more likely to stay engaged with your content. High-quality, compressed images ensure that visitors can access the visual elements of your website without waiting for prolonged load times. This positive experience can lead to increased user retention and higher conversion rates.

    Bandwidth Savings

    Compressed images consume less bandwidth, making your website more efficient, especially for users with limited data plans or slower internet connections. This can be particularly important for mobile users, as they often have restricted data allowances.

    Reduced Server Load

    Smaller image sizes translate to reduced server load, as the server needs to process and transmit less data for each image request. This can help prevent performance issues during peak traffic times and reduce hosting costs.

    Higher SEO Rankings

    Google and other search engines consider page loading speed as one of the ranking factors. Faster loading times, achieved through image compression, can positively impact your website’s SEO and potentially lead to higher search engine rankings.

    Ease of Backup and Restoration

    Smaller image files are quicker to backup and restore, making it easier to manage your website’s backups efficiently.

    Accessibility Considerations

    Faster loading times benefit all users, including those with disabilities who may rely on screen readers or have limited bandwidth access.

    The easiest way to implement image compression on WordPress websites is to use a plugin like Smush, which can be easily installed and configured to handle image compression and optimization automatically as you upload media to your WordPress site (both internally to the Media Library and external media directories) without compromising visual quality.

    Choose Ultra Smush For Superior Image Optimization

    As mentioned earlier, Ultra Smush is a Smush Pro feature. If you’re currently using the free Smush plugin, consider becoming a WPMU DEV member and start enjoying the benefit of extra savings and performance improvements, plus access to the most robust “all-in-one” WordPress management platform available anywhere.

    So, if your aim is to significantly reduce image file sizes and automate the entire process, the solution is ultra simple…enable Ultra Smush on all your WordPress sites and experience an optimization boost of up to 5x in image compression savings and impressive image quality.

    Go to source

  • How to Disable Automatic Update Email Notification in WordPress

    Do you want to disable automatic update email notifications in WordPress?

    By default, WordPress sends email notifications for automatic updates of WordPress plugins, themes, and the core itself. These notification emails can get annoying.

    In this article, we will show you how to easily disable automatic update email notifications in WordPress.

    Disabling automatic update email notifications in WordPress

    About Automatic Update Notifications in WordPress

    WordPress is an open-source content management platform that is regularly maintained and updated.

    Some of these updates are automatically installed, and you will receive an email notification that your site has been updated.

    Email notification preview after an auto-update

    Similarly, WordPress also allows you to enable automatic updates for WordPress plugins and themes. This means that you can spend less time updating plugins and more time growing your business.

    You can enable automatic updates for plugins that you trust by visiting the Plugins » All Plugins page in your WordPress admin dashboard.

    Simply click on the ‘Enable auto-updates’ link next to the plugin that you want to update itself.

    Enable automatic updates for WordPress plugins

    For WordPress themes, you can visit the Appearance » Themes page and click on a theme.

    This will bring up a theme information popup where you must click on ‘Enable auto-updates’.

    Enable theme auto-updates

    WordPress will send you an email notification when any of your plugins, theme, or WordPress core is updated.

    This can get annoying, particularly for users who manage multiple WordPress websites. Wouldn’t it be nice if you could control and turn off these email notifications?

    Let’s take a look at how to easily disable automatic update email notifications in WordPress. You can use the quick links below to jump to the method you want to use:

    Method 1: Disable Automatic Update Email Notification Using Code (Recommended)

    This method requires you to add code to your WordPress files. If you haven’t done this before, then take a look at our beginner’s guide on pasting snippets from the web into WordPress.

    You can manually add the code below to your theme’s functions.php file. But this can be tricky since a mistake can bring down your whole website. Plus, if you update your theme, then any custom code snippets will be erased.

    We will show you a better approach below, which is using a code snippets plugin.

    1. Disable Auto Update Notification Emails for WordPress Core, Themes, and Plugins

    Luckily, there is an easy and safe way to disable auto update notification emails in WordPress, and that’s using the WPCode plugin.

    WPCode WordPress code snippets plugin

    WPCode lets you easily add custom code snippets in WordPress without editing your theme’s functions.php file.

    Plus, it has a full code library inside the plugin that includes ready-to-use, verified code snippets for popular feature requests like disabling automatic update emails, removing the WordPress version number, disabling comments, and more.

    First, you need to install and activate the free WPCode plugin. For step-by-step instructions, see our tutorial on how to install a WordPress plugin.

    Once the plugin is activated, you need to go to Code Snippets » Library from your WordPress admin dashboard.

    Then, search for the ‘Disable Automatic Updates Emails’ snippet and click on the ‘Use snippet’ button.

    Search for the Disable Automatic Updates Emails snippet in WPCode

    WPCode will then automatically add the code and set the proper insertion method.

    The snippet has three filters, with one for each type of auto-update email: WordPress core, WordPress plugins, and WordPress themes.

    Disable Automatic Updates Emails snippet in WPCode

    If you don’t want to use a particular filter, simply add a // at the beginning of the filter line.

    For example, if you still want to get auto-update emails for WordPress plugins, add a // to the plugin, and the filter will stop it from executing.

    Edit filters you don't want to execute in WPCode

    After that, all you have to do is toggle the switch from ‘Inactive’ to ‘Active’.

    Then, click the ‘Update’ button.

    Switch the code snippet to Active and click Update in WPCode

    Now you will no longer get automatic update emails from WordPress.

    2. Disable Auto Update Notification Emails for Core Updates

    You can also use WPCode to disable notification emails for automatic WordPress core updates. Instead of choosing an existing code snippet, you will need to add this code as a custom snippet:

    add_filter( 'auto_core_update_send_email', 'wpb_stop_auto_update_emails', 10, 4 );
    
    function wpb_stop_update_emails( $send, $type, $core_update, $result ) {
    if ( ! empty( $type ) && $type == 'success' ) {
    return false;
    }
    return true;
    }
    

    For more instructions, you can see our guide on how to add custom code in WordPress.

    3. Disable Auto Update Notification Emails for Plugins

    Just add the following code to disable notification emails for automatic updates of WordPress plugins:

    add_filter( 'auto_plugin_update_send_email', '__return_false' );
    

    4. Disable Notification Emails for WordPress Theme Updates

    Finally, you can add the following code to disable notification emails for automatic updates of WordPress themes:

    add_filter( 'auto_theme_update_send_email', '__return_false' );
    

    Method 2: Disable Automatic Update Email Notification Using a Plugin

    Next, we will show you how to disable automatic update email notifications using two different email plugins.

    1. Manage Notification Emails

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

    Upon activation, you need to visit the Settings » Notification emails page. This is where the plugin allows you to manage all WordPress notification emails, including auto-update notifications.

    Disable email notifications

    Simply scroll down to the auto-update options and uncheck the box next to the notifications you want to disable.

    Finally, don’t forget to click on the ‘Save Changes’ button to store your settings.

    2. WP Mail SMTP

    Another plugin you can use to disable automatic update email notifications is WP Mail SMTP. It’s the best SMTP service for WordPress and ensures your emails are delivered to your inbox.

    WP Mail SMTP lets you easily manage the emails sent by WordPress through its Email Controls. However, you will need the WP Mail SMTP Pro license to unlock the Email Controls option.

    Next, you will need to install and activate WP Mail SMTP Pro on your website. You can check out our guide on how to install a WordPress plugin for more details.

    Once the plugin is active, navigate to WP Mail SMTP » Settings from your WordPress admin panel and click the ‘Email Controls’ tab.

    After that, scroll down to the ‘Automatic Updates’ section and disable email notifications for plugins, themes, WP core status, and full log.

    Disable Update Email Notifications in WP Mail SMTP

    When you are done, don’t forget to click the ‘Save Settings’ button.

    That’s all. You have successfully disabled WordPress auto-update email notifications for your website.

    Rolling Back WordPress Updates if Something Goes Wrong

    Because WordPress plugins run on many independent WordPress hosting and server configurations, sometimes a plugin update may break a feature on your website or make it inaccessible.

    This is easy to troubleshoot and fix. First, you need to figure out which plugin has caused the issue by deactivating all WordPress plugins and reactivating them one by one.

    Once you have isolated the plugin causing the issue, you can use the WP Rollback plugin. It allows you to switch to the previous version of a WordPress plugin or theme.

    For details, you can see our guide on how to roll back WordPress plugins and themes with step-by-step instructions.

    Improving WordPress Email Deliverability

    Even if you disable WordPress auto-update emails, there are other WordPress notification emails that you may not want to miss.

    For instance, if you run a WooCommerce store, then you will want to receive notifications when a new order is placed.

    Similarly, if you sell an online course or run a membership website, then you might want to receive email alerts when new users sign up.

    You will also want to make sure that emails sent to users are delivered, including forgotten password emails, payment receipt emails, and order confirmation notifications.

    To send emails, WordPress uses the PHP mail function. This function is easily misused by spammers, and your emails may end up in the spam folder.

    To make sure all your important WordPress notification emails reach your users’ inboxes, you will need a proper SMTP service to send emails.

    This is where the WP Mail SMTP plugin comes in. It uses an SMTP service to send all your WordPress notification emails.

    You can use it with a paid SMTP service provider or a free SMTP service like Gmail combined with the free version of the WP Mail SMTP plugin.

    For more details, see our guide on How to set up WP Mail SMTP on your WordPress site.

    We hope this article helped you learn how to disable automatic update email notifications in WordPress. You may also want to see our guide on how to get a free business email address and our comparison of the best email marketing services to grow your sales.

    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 Disable Automatic Update Email Notification in WordPress first appeared on WPBeginner.

    Go to source

  • How to Create a Mailchimp Subscribe Form in WordPress With Custom Fields

    Are you looking to add a Mailchimp subscribe form to your WordPress website?

    Mailchimp is a popular email marketing tool that offers a form builder. However, this builder has limited features and customization options. Adding a custom subscribe form gives you more flexibility and helps grow your email list.

    In this article, we will show you how to create a Mailchimp subscribe form in WordPress with custom fields.

    How to create Mailchimp subscribe form in WordPress

    Why Add a Custom Mailchimp Subscribe Form in WordPress?

    Adding a subscription form to your WordPress website is a great way of communicating with your users.

    You can send newsletters, new product releases, announcements, and other information while creating a direct connection with your audience.

    Mailchimp is one of the most popular email marketing services. It helps you build an email list, send emails, and set up automated email campaigns. Plus, it also offers a form builder that you can use to create a subscription form and embed it on your website.

    However, Mailchimp’s form builder is very basic and doesn’t offer a lot of customization options. You get limited form fields to choose from, and there are no settings to change color, font, and more. It also adds Mailchimp branding at the bottom.

    Mailchimp subscribe form preview

    Creating a custom Mailchimp subscribe form gives you more flexibility and control. You can add all types of form fields, edit their appearance, add conditional logic to show fields based on the user’s responses, and more.

    That being said, let’s look at how you can create a Mailchimp subscription form with custom fields.

    How to Create a Mailchimp Subscribe Form in WordPress

    The easiest way of adding a Mailchimp subscribe form in WordPress is by using WPForms. It is the best contact form plugin for WordPress that’s used by over 5 million professionals.

    WPForms is a beginner-friendly plugin that offers a drag-and-drop form builder, prebuilt templates, and lots of customization options. The best part is it easily integrates with Mailchimp.

    Note: For this tutorial, we will be using the WPForms Pro version because it includes the Mailchimp addon and custom form fields. There is also the WPForms Lite version that is available for free, but it doesn’t offer a Mailchimp integration.

    Step 1: Connect Mailchimp With WPForms

    First, you will need to install and activate the WPForms plugin. If you need help, then please see our guide on how to install a WordPress plugin.

    Upon activation, you will need to go to WPForms » Settings and add the license key. You can find the key in your WPForms account area.

    After entering the license key, go ahead and click the ‘Verify Key’ button.

    Adding a license key to the WPForms form builder plugin

    Next, you will need to install the Mailchimp addon.

    You can do that by going to WPForms » Addons from the WordPress admin panel. From here, navigate to the Mailchimp addon and click the ‘Install Addon’ button.

    Install Mailchimp addon

    The addon should now install and activate.

    Once that’s done, simply go to WPForms » Settings from your WordPress dashboard and switch to the ‘Integrations’ tab.

    Integrate MailChimp with WPForms

    Next, you can expand the Mailchimp settings and then click the ‘+ Add New Account’ button under Mailchimp.

    As soon as you do that, you will see more options. To integrate Mailchimp, you must enter the API key and account nickname. This will allow WPForms to communicate with your Mailchimp account.

    See more Mailchimp integration options

    Creating Mailchimp API Keys for WPForms Integration

    To create an API key to connect WPForms, you will first need to log in to your Mailchimp account.

    Once you are logged in, simply click on your avatar in the top right corner and select the ‘Account & billing’ option.

    Click your Mailchimp avatar

    On the next page, you will see different account settings.

    Simply click the ‘Extras’ dropdown menu and then select the ‘API keys’ option.

    Open API keys page

    Next, you can copy an existing API key to use for your WPForms integration.

    If you haven’t generated a key previously, then simply click the ‘Create A Key’ button.

    Create a new key

    After that, you can enter a name for your new API key.

    Once that’s done, just click the ‘Generate Key’ button.

    Enter a name for API key

    Next, you will see the new API key.

    Go ahead and copy the key and click the ‘Done’ button.

    Copy the API key

    You can now return to the browser tab or window with your WPFroms integration settings.

    From here, simply paste the key into the ‘API Key’ field. You can also add a Mailchimp account nickname to remember which account you are connected to.

    Enter your Mailchimp API key

    After entering the key, go ahead and click the ‘Connect to Mailchimp’ button.

    You should now see a green ‘Connected’ button next to the Mailchimp settings, showing that the email marketing tool is successfully integrated with WPForms.

    See Mailchimp connection

    Step 2: Design a Mailchimp Subscribe Form With Custom Fields

    Now that you have integrated Mailchimp with WPForms, the next step is to create a subscription form with custom fields.

    First, you will need to go to WPForms » Add New from the WordPress dashboard. Next, you can enter a name at the top and select a form template.

    Select a form template

    WPFomrs offers lots of prebuilt form templates, so you can quickly pick one and customize it.

    It even offers form templates for Mailchimp. For instance, you can create a signup contact form, newsletter signup form, or email marketing form.

    Mailchimp form templates

    For this tutorial, we will choose the Mailchimp Newsletter Signup Form template.

    On the next screen, you will see the WPForms drag-and-drop form builder. Here, you can customize the form and add custom fields from the menu on the left.

    Add custom form fields

    The default form template will come with a Name and Email field.

    However, you can simply drag any form field and drop it onto the template. There are fields to add text, dropdown options, multiple choice, phone number, address, date and time, website, password, and more.

    For instance, if you are using a business phone service, then you can add a Phone field. This will help you send SMS messages or reach out to subscribers via phone calls.

    Adding custom form fields

    You can add a checkbox field and allow users to select their interests. This way, you can segment your subscribers and send them targeted emails.

    Next, you can further edit each form field in the template. Simply choose a field, and you will see more options in the left panel.

    For example, we changed the options in the Checkboxes form field.

    Customize each form field

    You can also edit the label of the form field, make it a required field, add images to the checkbox options, and more.

    Once you have finished adding custom form fields, switch to the ‘Settings’ tab from the left menu. In the General settings, you can change the form’s name and description, add tags, edit the submit button text, and more.

    General form settings Mailchimp

    Next, you can switch to the ‘Confirmations’ tab and choose what subscribers will see once they submit a form.

    WPForms lets you show a message, a specific page like a thank you page, or redirect users to a URL.

    Confirmation settings Mailchimp form

    After that, you can go to the ‘Marketing’ tab from the left panel and then select Mailchimp.

    From here, simply click the ‘Add New Connection’ button.

    Add new Mailchimp connection

    Next, a small popup will open where you will need to enter the Mailchimp nickname.

    After entering it, go ahead and click the ‘OK’ button.

    Enter connection nickname

    Next, you can pick the Mailchimp account that you connected to earlier.

    Simply click the ‘Select Account’ dropdown menu and choose your account.

    Select your Mailchimp account

    After that, more options will appear.

    You can go ahead and select the audience from the dropdown menu to which the new subscribers will be added.

    Select audience and action

    There are different actions to choose from, but we will select the ‘Subscribe’ option for this tutorial. This will add the user as a new contact to your Mailchimp account.

    Next, you can scroll down to see additional settings. For instance, there is an option to choose the WPForms field where users can enter their email addresses.

    Additional Mailchimp settings in WPForms

    You also have options to add tags to new subscribers and a note to the user’s profile.

    If you scroll down further, then you will see more optional settings. For instance, you can enable double opt-in, mark the subscriber as VIP, update their profile if the contact is already in an audience, and more.

    More Mailchimp settings in WPForms

    Now, you are ready to add your Mailchimp subscribe form to your WordPress blog or website.

    In the WPForms form builder, you will see an ‘Embed’ option at the top. Go ahead and click on the ‘Save’ button to store your changes, and then click the ‘Embed’ button.

    Save and embed your form

    Next, a popup will open where you will need to select an existing page or create a new page.

    For this tutorial, we will use the ‘Create New Page’ option.

    Embed a form in page

    After that, you will need to enter a name for your new page.

    Once that’s done, simply click the ‘Let’s Go!’ button.

    Enter name for form embed page

    Next, you will see a preview of your form in the WordPress content editor.

    You can then click the ‘Publish’ button at the top to make your Mailchimp subscribe form live.

    View preview of subscribe form

    You have now successfully created a Mailchimp subscribe form with custom fields.

    You can go ahead and visit your website to see the form in action.

    Mailchimp subscribe form with custom fields preview

    You can also do a lot more with Mailchimp and WordPress. For instance, you can integrate it with OptinMonster and show your subscribe forms in popup campaigns.

    To learn more, please see our ultimate guide to using Mailchimp and WordPress.

    We hope this article helped you learn how to create a Mailchimp subscribe form in WordPress with custom fields. You may also want to see our guide on easy ways to grow your email list faster and our expert picks for the must have WordPress plugins to grow your website.

    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 a Mailchimp Subscribe Form in WordPress With Custom Fields first appeared on WPBeginner.

    Go to source

  • How to Restrict Content on WordPress to Patreon Members

    Do you want to restrict content on WordPress to Patreon members?

    By adding patron-only content to your website, you can encourage visitors to join your Patreon and increase your profits. It’s also a great way to get Patreon users to visit your website, which will boost your traffic and can increase revenue further.

    In this article, we will show you how to restrict content on WordPress to Patreon members.

    How to restrict content on WordPress to Patreon members

    Why Restrict Content on WordPress to Patreon Members?

    If you are a content creator, then you may want to earn money from your writing, music, podcasts, stock photos, and other content.

    Patreon allows you to sell memberships and then give those people access to different content based on their subscriptions.

    Patreon is also a great way to build relationships with your fans. For example, you can automatically send a welcome note to new patrons.

    An example of a custom Patreon welcome note

    You can also create private Discord servers or chat rooms where members can talk to each other and even message you directly.

    After creating a Patreon, it’s a good idea to publish members-only content to your WordPress website. This encourages visitors to join your Patreon in order to unlock exclusive WordPress content.

    This can also increase your blog traffic since patrons will need to visit your WordPress site to see the exclusive content.

    That said, let’s see how you can restrict content on WordPress to Patreon members.

    How to Create a Patreon Account for Your WordPress Website

    If you don’t already have an account, then head over to the Patreon website and click on the ‘Create on Patreon’ button.

    Creating a Patreon account for your fans

    You can now type in your email address and create a password. If you prefer, then you can also register using your existing Google or Facebook login.

    After entering this information, the setup wizard will ask some questions about how you plan to use Patreon. Simply follow the onscreen instructions to build an engaging and informative Patreon page.

    With that done, you can use the Patreon tools to customize your page, add membership tiers, set up billing, and more.

    How to create a Patreon page using the built-in tools

    When you are happy with how your Patreon page looks, you are ready to add it to your WordPress website.

    How to Connect WordPress to Your Patreon Account

    The easiest way to create Patreon-only content is by using Patron Plugin Pro. This plugin allows you to restrict access to individual pages and posts or even lock all the content from a specific tag or category.

    You can also automatically lock and unlock content based on a schedule. This allows you to create free trials, automatically drip content, and more.

    First, you will need to install and activate Patron Plugin Pro. If you need help, then please see our guide on how to install a WordPress plugin.

    Upon activation, you will need to connect the plugin to your Patreon account. To do this, go to Patreon Settings » Patreon Settings, and then click on ‘Connect site’.

    Connecting your Patreon account to WordPress

    When you are ready, select ‘Start connection wizard’.

    On the next screen, you need to click on ‘Let’s start!’

    Connecting a WordPress website to Patreon

    To connect Patreon to your WordPress website, you will need to create an OAuth client.

    If you are happy to do this, then click on ‘Allow’.

    How to connect Patreon and WordPress using an OAuth client

    If prompted, type in the login information for your Patreon account.

    After a few moments, Patron Plugin Pro will take you back to the main WordPress dashboard. Your Patreon account is now connected to WordPress.

    Before you restrict any content, it’s a good idea to look at the plugin’s settings by going to Patreon Settings » Patron Settings.

    The Patron Plugin Pro plugin from CodeBard

    The default settings should work well for most websites, but it’s still worth checking whether you need to make any changes.

    If you do customize the settings, then scroll to the bottom of the screen and click on the ‘Update Settings’ button.

    Updating your Patreon settings using the Patron Pro Plugin

    How to Restrict Content to Patreon Members

    The easiest way to create patron-only content is by restricting access to entire content types, categories, or tags. For example, you might lock all content that has the ‘Patreon’ tag.

    To do this, simply select ‘Patreon Plugin Pro’ from the left-hand menu and then click on the ‘Content Locking’ tab.

    Restricting content in WordPress to Patreon members

    Here, you must click to expand the ‘Make post types Patron only’ section.

    To start, open the ‘Select Post Type’ dropdown and choose the content you want to restrict, such as page, post, media, or some other content type.

    Restricting content categories to Patreon members

    Then, open the new ‘All’ dropdown and choose whether you want to restrict this content type based on format or categories and tags.

    Depending on your selection, you will get access to some additional settings. For example, if you select ‘Tag’, then you will need to choose the tag you want to make Patreon-only.

    Restricting tags to Patreon members in WordPress

    Finally, open the ‘Select how to lock’ dropdown and choose how you want to lock and unlock the content.

    The easiest option is ‘Lock all posts of this type’. However, you can also lock the most recent example of this content and use the older content as a preview for non-members.

    You can also unlock or lock content after a certain number of days has passed. This allows you to offer exclusive early access to Patreon members.

    Similarly, you can use this feature to create a free trial. For example, you might make your latest online course available to non-patrons for the first 24 hours. This can create a buzz around the launch while also encouraging people to join your Patreon so that they don’t lose access after 24 hours.

    Based on your selection, you will see some additional options.

    Locking your WordPress content using an automated delay

    Most importantly, you will need to enter a minimum $ value membership tier.

    This should be linked to the cost of your memberships. For example, if your Silver tier is $5, then typing ‘$5’ will unlock this content for everyone with a Silver or higher membership.

    Setting a fee for restricted content in WordPress

    When you are happy with how the content locking is set up, click on ‘Add post type to gating.’

    To lock more content, simply follow the same process described above. When you have finished, don’t forget to scroll to the bottom of the screen and click on ‘Save.’

    How to Restrict Specific Pages and Posts to Patreon Members

    Another option is to mark individual pages and posts as Patreon-exclusive. This allows you to control exactly what content your patrons have access to.

    To start, simply open the page or post in the WordPress content editor.

    Next, you will need to set some rules about who can access this content. In the right-hand menu, scroll to the ‘Patreon Level’ section and choose from the dropdown menu.

    You can either select a Patreon level or choose ‘Any Patreon’. For example, you might select ‘Any Patreon’ if this is entry-level content that all members should have access to or if you have only created a single Patreon tier.

    Restricting content based on Patreon levels in the WordPress post and page editor

    Often, you will want to give new patrons access to your entire back catalog of members-only content. Another option is to restrict access to people who were already patrons when the content was published.

    This is useful for creating time-sensitive Patreon promotions, such as exclusive holiday content or a ‘limited edition’ video.

    To add this restriction, find the ‘Require a pledge active at the time….’ section and check its ‘Yes’ box.

    Requiring an active Patreon pledge

    Another option is to show or lock the content automatically based on a schedule. This is perfect for offering exclusive early access to Patreon members.

    To lock and unlock content automatically, find the ‘Advanced Locking’ section. Here, open the dropdown that shows ‘No change’ by default and choose an option from the list.

    Patreon's advanced content locking settings

    You can then use the new settings to configure the automatic locking and unlocking.

    By default, the plugin will show the following message to all non-Patreon members: ‘To view this content, you must be a member of (name) content at (cost) or more.’

    Showing a message to non-patron visitors

    You may want to add your own message for non-Patreon members. For example, you might say why the content is restricted or why they should buy a Patreon subscription.

    To add a message, scroll to the ‘Custom Patron-Only Banner’ section and click on the ‘Non-Patrons Only’ button.

    Creating a custom message for Patreon members

    This adds some opening and closing tags to the small text editor.

    Simply type your message in between these tags. You can also add links, formatting, and more in exactly the same way you create content in the WordPress page or post editor.

    Advertising Patreon on your WordPress website

    When you are happy with the settings, simply click on the ‘Publish’ or ‘Update’ button.

    If you visit this content while logged into your admin account, then you won’t see any changes. However, if you visit it in an incognito browser tab, then you will see the content restriction in action.

    Viewing restricted content as a non-Patron member

    How to Add a Patreon Button to Your WordPress Posts

    Adding Patreon-exclusive content to your WordPress blog is a great start. However, it’s also a good idea to promote your Patreon on other areas of your website. This will help turn visitors into paying patrons.

    Patron Plugin Pro can automatically add a ‘Become a Patron’ button to all your posts. Visitors can simply click this button to visit your Patreon page.

    Adding a Patreon button to any WordPress post

    To start, select ‘Patron Plugin Pro’ from the left-hand menu, then select the ‘Quickstart’ tab.

    Since we already connected the plugin to Patreon, you should see your account in the ‘Site’s Patreon user’ field.

    CodeBard's Patron Plugin Pro settings

    If you don’t see the right URL, then you can add it now.

    After that, you are ready to configure how the call to action button acts.

    By default, the plugin opens your Patreon page in the same tab. This takes visitors away from your WordPress website, so we recommend opening the link in a new tab instead.

    To do this, select ‘Yes’ under ‘Open pages in new window’.

    How to open a Patreon link in a new tab on your WordPress website

    The plugin adds the standard Patreon button to your website by default. This helps visitors recognize the button and understand that you have a Patreon page.

    If you prefer, then you customize the button with your own branding using the settings under ‘Use a custom button’. When you are happy with the changes you’ve made, don’t forget to click on ‘Save’.

    Next, click on the ‘Post Button’ tab to change how the button looks.

    Customizing the Patreon button on your WordPress blog or website

    By default, the button includes the following heading: ‘Liked it? Take a second to support {authorname} on Patreon!’

    To replace this with your own messaging, simply go ahead and type into the ‘Message over Buttons in Posts’ field.

    Customizing the message above a Patreon button

    You can also change the message’s alignment, adjust its size, and add margins.

    If you want to remove the message instead, then find the ‘Show a message over Buttons in Posts’ section. Here, simply click the ‘No’ button.

    Removing the custom message from a Patreon button in WordPress

    If you make any changes, then don’t forget to click on ‘Save’.

    Now, you can visit any post on your website to see the Patreon button live.

    How to Add a Patreon Button to the WordPress Sidebar

    If you prefer, then you can remove the Patreon button from your blog posts and add it to the sidebar or similar section instead.

    In this way, you can show the button on other areas of your website, such as the product pages in your online store.

    To start, you will want to remove the button from your WordPress posts so that you don’t show multiple Patreon buttons on the same page.

    To do this, select the ‘Post Button’ tab and find the ‘Show Button under Posts’ section. Here, go ahead and select the ‘No’ button.

    Adding a Patreon button to your WordPess website using the CodeBard plugin

    With that done, click on ‘Save’.

    Next, click on the ‘Sidebar Widgets’ tab. Here, you can customize the message that appears next to the button, including changing the font size and adding margins.

    Adding a Patreon button to the WordPress sidebar

    If you do make any changes, then don’t forget to click on the ‘Save’ button.

    With that setup done, you can add the Patreon button to any widget-ready area by going to Appearance » Widgets. Here, click on the blue ‘+’ button.

    Adding a Patreon block to any widget-ready area of your WordPress theme

    Note: If you are using a block WordPress theme, then you will need to go to Appearance » Editor instead.

    In the panel that appears, start typing in ‘Patreon Sidebar Site Widget’.

    When the right block appears, drag and drop it onto the area where you want to show the Patreon button.

    Promoting your Patreon to the people who visit your website

    You can now type an optional title into the ‘Title’ field.

    This will appear above the Patreon button in the theme’s sidebar or similar section.

    Adding a title to a Patreon button WordPress

    With that done, click on ‘Update’.

    Now if you visit your WordPress blog or website, you will see the Patreon button in the widget-ready area.

    An example of a Patreon button, on a WordPress website

    Bonus: How to Create a Patreon Alternative Using WordPress

    Patreon has helped countless creators monetize their content and make money online, but the platform also takes a significant cut of your earnings.

    Depending on your Patreon plan, you will lose between 5%-12% of everything you earn on Patreon, plus payment processing and payout fees.

    Depending on your location, you may also have to pay additional fees, including Value-added tax, Goods and services tax, Québec sales tax (QST), and US Sales tax.

    All of this can really add up.

    You will also need to follow all of Patreon’s terms and conditions and other guidelines. If you break any rules, then Patreon will censor your content and may even delete your account. If this happens, then paying members will lose access to your content, which reflects badly on your brand and can damage your reputation.

    With that being said, many WordPress website owners are looking for a Patreon alternative.

    That’s where MemberPress comes in.

    The MemberPress membership plugin

    MemberPress is the best membership plugin for WordPress.

    It allows you to create unlimited membership levels for your WordPress website and then restrict access to your content based on the person’s membership level.

    Membership tiers, in the MemberPress WordPress plugin

    In this way, you can create members-only videos, eBooks, blog posts, online courses, downloadable files, and more.

    You can even assign different content to different membership levels, which encourages members to upgrade their subscriptions.

    Different membership levels on a WordPress members website

    This is exactly how the Patreon tier model works, without any of the extra transaction fees. Since MemberPress doesn’t take a cut of your earnings, you get to keep more of the money you make.

    For more on this topic, please see our detailed guide on how much it costs to start a membership site.

    With MemberPress, you also have the freedom to create your own privacy policy, rules, and terms and conditions. This gives you more flexibility to create unique and engaging content for your fans, which will make it easier to grow your business.

    To help you get started, we have created an ultimate guide to building a WordPress membership site using MemberPress.

    We hope this article helped you learn how to restrict content on WordPress to Patreon members. You may also want to read our guide to the best social media plugins for WordPress to grow your online following and learn how to run a giveaway/contest in WordPress.

    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 Restrict Content on WordPress to Patreon Members first appeared on WPBeginner.

    Go to source

  • How to Cloak Affiliate Links on Your WordPress Site

    Are you looking for a way to cloak affiliate links on your WordPress site?

    Cloaking your affiliate links in WordPress provides clean and easy-to-read links, which can increase the likelihood of clicks and conversions. It can also increase user trust.

    In this article, we will show you how to easily cloak affiliate links in WordPress.

    Cloaking affiliate links in WordPress

    What Is Affiliate Link Cloaking, and Why Do You Need It?

    Link cloaking is a technique used to make long affiliate links into shorter and branded links on your WordPress website.

    Often, affiliate links are lengthy, hard to remember, and show your affiliate username or ID like this:

    http://www.affiliatesite.com/products/?product_id=123&affiliate=123

    With link cloaking, you can shorten your ugly affiliate links into branded URLs like this:

    http://www.yoursite.com/refer/productname

    This can make your links look more trustworthy and professional to your audience, encouraging more clicks.

    If you use affiliate links to make money from your WordPress blog, then you should cloak links, as doing this can increase your click-through rate and conversions.

    Many link-cloaking plugins will also help you measure the performance of your affiliate marketing strategies and optimize them for better results.

    Cloaking affiliate links also adds an additional layer of security by masking the actual affiliate URL. This can protect your affiliate accounts and earnings from fraud or theft.

    This can also help prevent your links from being blocked by social media sites or search engines, increasing the search visibility of your affiliate content.

    Having said that, let’s see how you can easily cloak affiliate links on your WordPress website, step by step.

    How to Cloak Affiliate Links in WordPress

    There are many link-cloaking plugins that you can use in WordPress, including Pretty Links and Thirsty Affiliates. Both plugins are great, but we will use Pretty Links for this tutorial since it’s a little more beginner-friendly for this use case.

    You can easily cloak affiliate links in WordPress using Pretty Links. It is one of the best affiliate marketing tools for WordPress that lets you add, manage, and cloak affiliate links.

    Install and Activate Pretty Links

    First, you need to install and activate the Pretty Links plugin. For detailed instructions, please see our beginner’s guide on how to install a WordPress plugin.

    Note: Pretty Links also has a free version that can cloak links. However, we will be using the Pro version in the tutorial to unlock more features.

    Create Your Cloaked Link

    Upon activation, you need to head over to the Pretty Links » Add New page from the WordPress admin sidebar to create an affiliate link.

    Once you are there, you can start by typing a name for your link into the ‘Add Title’ option.

    After that, you must select a link type from the ‘Redirection’ dropdown menu to create short and branded links for your affiliate program.

    If you choose ‘Cloaked’, then the target URL will be hidden in your user’s browser, and they will only see your cloaked link. Some affiliate programs don’t allow this, so you will need to check first.

    Another option is ‘307 Temporary’. It will replace the original URL with your new affiliate link and tell search engines that this link may change in the future.

    Add a title for your affiliate link and choose the Cloaked option as the redirection type

    Next, simply copy and paste your affiliate link into the ‘Target URL’ field.

    Once you have done that, type the slug you want to use for your cloaked link into the ‘Pretty Link’ field.

    For example, if you want your cloaked link to be like the example below, then you will need to type the ‘/refer/bluetooth-speakers’ text into the ‘Pretty Link’ field. You will then get a link like this:

    www.example.com/refer/bluetooth-speakers

    Add cloaked affiliate link

    Choose Attributes for Your Cloaked Link

    After that, simply switch to the ‘Advanced’ tab from the sidebar on the left.

    From here, you can add different attributes to your affiliate link by checking the box next to these options.

    For instance, if you want to add a nofollow attribute to the external link, then simply check the box next to ‘No Follow’. This means that search engines won’t pass on any link authority to the site you are linking to.

    Add attributes to the cloaked affiliate link

    You can also check the ‘Sponsored’ box to tell search engines that your link is a paid advertisement.

    Plus, checking the ‘Parameter Forwarding’ box can be handy if you want to pass a coupon code or customer ID to your cloaked link.

    It’s also a good idea to check the box next to ‘Tracking’ so that you can view your affiliate link performance in the Pretty Links reports.

    Configure Pro Settings for Your Cloaked Link

    Once you have done that, you need to switch to the ‘Pro’ tab from the sidebar on the left. Now, you can set an expiry date for the affiliate link by checking the ‘Expire’ option.

    This will expand a tab on your screen where you can set an expiry date for the link after a specific date or number of link clicks.

    For example, if you choose the ‘Clicks’ option from the ‘Expire After’ dropdown menu and type 5 into the ‘Clicks’ field, then your affiliate link will immediately expire once 5 visitors have clicked on the link.

    You can also type a URL for the expired redirect into the ‘URL’ field. This will be the link that users will be redirected to if they click on the expired affiliate link.

    Set an expiry date for the cloaked affiliate link

    After that, you can type the keywords that you would like to be replaced with your affiliate link into the ‘Keywords’ field.

    This means that whenever the keyword you choose is written in your WordPress post or page, the plugin will automatically add its affiliate link to the keyword.

    You can also easily replace another URL with your affiliate link by typing it into the ‘URL Replacements’ field.

    Now, whenever Pretty Links finds this URL on your website, it will replace it with the cloaked link.

    Choose a keyword and replacement URL

    Once you are done, simply click the ‘Update’ button in the Publish section to store your changes.

    After that, you need to click the ‘Publish’ button in the same section to publish your cloaked affiliate link.

    Save affiliate link

    Add Your Cloaked Link to a WordPress Post or Page

    Now, you can visit a WordPress post or page where you want to add the cloaked affiliate link.

    Once you are there, simply select the text that you want to link on top of and then click the ‘Pretty Links’ icon in the block toolbar at the top.

    This will open up a link prompt on your screen, where you can search for the cloaked affiliate link using its title or the link itself.

    Add affiliate link in the block editor

    Upon adding the link, just click the ‘Publish’ or ‘Update’ button at the top to store your settings.

    Now, you can visit your website and click on the affiliate link. You will now see the cloaked URL redirecting you to the affiliate product page.

    Preview for cloaked links

    We hope this article helped you learn how to easily cloak affiliate links in WordPress. You may also want to see our tutorial on how to create an affiliate product box in WordPress and our expert picks for the best WordPress themes for affiliate marketing.

    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 Cloak Affiliate Links on Your WordPress Site first appeared on WPBeginner.

    Go to source

  • How to Create an Alert Bar in WordPress (3 Easy Ways)

    Do you want to add an alert bar to your WordPress site?

    An alert bar or notification bar is a great way to let visitors know about important updates, special offers, new product launches, and more.

    In this article, we will show you how to create an alert bar in WordPress with 3 easy solutions.

    How to create an alert bar in WordPress

    Why Create an Alert Bar in WordPress?

    An alert bar is a great way to let your visitors know about something important on your website. That could be an ongoing sales event, an update to your opening times, or changes to your services.

    You can also use an alert bar to tell visitors about a special deal, such as a buy one get one free offer. This is a great option if you run an online store.

    Using an alert bar is better than just putting an announcement on your homepage. Your alert bar can appear prominently right at the top of every page across your entire site.

    It’s easy to create an alert bar in WordPress. We will look at methods using the best notification bar plugins and a manual method using HTML and CSS code. Simply click the links below to jump straight to each option:

    Method 1: Creating an Alert Bar Using OptinMonster

    OptinMonster is the best conversion optimization and lead generation software on the market. It helps you convert more website visitors into subscribers and customers.

    OptinMonster offers a drag-and-drop campaign builder. It comes with beautiful lightbox popups, welcome mats, countdown timers, and other dynamic overlays that help you increase subscribers and sales on your website.

    You can also use OptinMonster to make an alert bar for your website. Their pre-built templates make it really easy to create an alert bar that looks great within minutes.

    First, you need to visit the OptinMonster website and sign up for an account. You will need at least the Basic plan because it includes the Floating Bar campaign type.

    The OptinMonster conversion optimization plugin

    Next, you need to install and activate the OptinMonster WordPress plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

    This plugin lets you connect your WordPress site to the OptinMonster software.

    Upon activation, you will see the welcome screen and the setup wizard. Go ahead and click the ‘Connect Your Existing Account’ button.

    Connect your existing account

    Next, a new window will open where you will need to connect your WordPress site to OptinMonster.

    Simply click the ‘Connect to WordPress’ button to move ahead.

    Connect OptinMonster to WordPress

    You can now follow the on-screen prompts to connect your OptinMonster account.

    Then, simply go to OptinMonster » Campaigns in your WordPress dashboard. Go ahead and click the ‘Create Your First Campaign’ button.

    Create your first campaign

    This will open the OptinMonster campaign builder.

    From here, you need to select the ‘Floating Bar’ as your Campaign Type to create an alert bar.

    Adding a sticky floating bar to the WordPress footer

    Next, you will see a choice of campaign templates. Pick a template that you want to use.

    You just need to bring your mouse over it and click the ‘Use Template’ button to select it. We are going to use the Coupon Code Promo template for our alert bar.

    Next, you will be asked to give your template a name. Once you have named your campaign, just click the ‘Start Building’ button.

    Enter a name for your campaign

    Now, you will see the campaign editor. This is where you can design your alert bar.

    OptinMonster offers different blocks that you can simply drag and drop onto the template. For instance, you can add an image, text, button, and more to your alert bar.

    Customize your alert bar

    You will see that your alert bar appears at the bottom of your screen by default.

    To move it to the top of the screen, you need to click ‘Floating Bar Settings’ on the left-hand side. Next, just click the slider to move the floating bar to the top of the page.

    Move alert bar to the top

    To change the text on the floating bar, simply click on the area you want to change and type in any text you want.

    You can also change the font, the size and color of the text, and more.

    Edit text in alert bar

    To change the countdown settings, simply select the timer.

    Then go ahead and enter your desired end date and time. OptinMonster also lets you choose the countdown type. You can select the ‘Static’ type if you’d like to show a standard timer with your specified end date and time.

    On the other hand, there is a ‘Dynamic’ countdown type. The timer will work based on each user’s behavior on your site. The countdown is set separately for each visitor to your website.

    Edit countdown timer settings

    Once you are happy with the design of your alert bar, don’t forget to click the ‘Save’ button at the top of your screen.

    Next, you need to go to the ‘Display Rules’ tab to select when and where your alert bar will display on your site. The default rule is for your alert bar to display after the visitor has been on the page for 5 seconds.

    We are going to change this to 0 seconds so that the alert bar appears instantly. To do that, just change the ‘sec’ value to 0.

    Set display rule time to zero

    Besides that, you can also select where the alert bar will appear. You can use the default setting, which is the ‘current URL path is any page’. This way, your alert bar will appear on all the pages of your WordPress website.

    Then, click the ‘Next Step’ button to change the Action settings. You can leave the ‘show the campaign view’ settings as Optin and select whether you’d like to play a sound effect when the alert bar appears.

    Action settings in display rules

    After you have made your changes, go ahead and click the ‘Next Step’ button once more.

    Here, you will see a summary of your display rules. You can make final edits and changes to your alert bar campaign.

    Summary of alert bar display rules

    Once you are happy, simply click the ‘Save’ button at the top of the screen.

    After that, you can go to the Publish tab at the top and change the Publish Status to ‘Publish’. Once that’s done, you will need to click the ‘Save’ button and close the campaign builder.

    Publish alert bar campaign

    Next, you will see the Campaign Output Settings.

    The final step is to activate the campaign on your website itself. Simply change the Status from ‘Pending’ to ‘Published’.

    Change alert bar output settings

    Don’t forget to click the ‘Save Changes’ button when you are done.

    Now, simply visit any page on your website, and you will see your campaign in action.

    View alert bar on website

    Method 2: Creating an Alert Bar Using Thrive Leads

    Another way you can add alert bars to your WordPress website is by using Thrive Leads. It is part of the Thrive Themes suite and helps you generate leads through alert bars, lightboxes, slide-in popups, and more.

    First, you will need to visit the Thrive Themes website and sign up for an account. Simply click the ‘Start Now’ button to get started.

    Thrive Themes Coupon Code

    Next, you will need to install and activate the Thrive Product Manager plugin on your website. For more details, please see our guide on how to install a WordPress plugin.

    You can find the Thrive Product Manager plugin in your account area.

    Download Thrive Product Manager plugin

    Once you have installed the plugin, simply go to the Product Manager page from your WordPress admin area.

    From here, go ahead and click the ‘Log into my account’ button.

    Go to Thrive product manager

    After logging in to your account, you will see different plugins and tools offered by Thrive Themes.

    Simply select the Thrive Leads plugin and then click the ‘Install selected products’ button at the bottom.

    Install the Thrive Leads plugin

    When Thrive Leads is ready to use, you will see a success message.

    You can then click the ‘Go to the Thrive Themes Dashboard’ button.

    See Thrive Leads ready to use

    Next, you will need to go to Thrive Dashboard » Thrive Leads from the WordPress admin panel.

    Next to the Lead Groups heading, simply click the ‘Add New’ button.

    Add new leads group

    After that, a popup window will now open.

    You can enter a name for your new lead group and click the ‘Add Lead Group’ button.

    Enter a name for lead groups

    Next, you will need to create a new opt-in form.

    Go ahead and click the ‘Add New Type of Opt-in Form’ button.

    Add new opt in form

    After that, Thrive Leads will ask you to select a form type.

    You can select the ‘Ribbon’ type to add an alert bar to your website.

    Choose ribbon form type

    After adding the Ribbon opt-in form type, you will now need to add a form.

    Simply click the ‘Add a form’ option under Lead Groups.

    Add a form to ribbon type

    On the next screen, you can choose from any of your existing forms.

    Since this is your first time making a form, go ahead and click the ‘Create Form’ button.

    Click create form

    Now, you will see a popup window appear on your screen.

    You can enter a name for your form and click the ‘Create Form’ button.

    Enter name for form

    Your form will be added to the Ribbon lead group.

    To edit the design of the form, just click the pencil icon.

    Edit design of ribbon form

    Next, Thrive Leads will show multiple templates to choose from.

    Simply select a template and click the ‘Choose Template’ button at the bottom.

    Select template for alert bar

    This will launch the visual builder with a live preview, where you can customize your alert bar.

    For instance, you can select the text in the template and change it according to your needs. Or click on the image in the alert bar and change it.

    Customize your alert bar design

    Once you are done editing, click the ‘Save Work’ button at the bottom.

    You can now close the visual editor and head back to the form settings. Here, you will see options for settings the alert bar trigger, display frequency, and position.

    Edit trigger and display frequency

    By default, the alert bar will appear at the top when a page loads. However, you can change these settings.

    For instance, if you click the Trigger option, you’ll see more options, like showing the alert bar after a certain time, when a user scrolls down a certain amount, or when a user reaches the bottom of the page.

    Change trigger for alert bar

    Besides that, you can also change the display frequency. The alert bar will appear all the time by default to all the users.

    However, you can edit this and display your alert bar to the same visitor after a certain number of days.

    Change display frequency of alert bar

    Next, you can head back to the Thrive Leads page from your WordPress dashboard.

    After that, simply click the cog icon to open the Display Settings.

    Click the settings icon

    From here, you can choose which posts and pages the alert bar will appear on.

    For instance, you can show it only on the front page or choose all posts and pages. There is also an option to exclude some pages and posts from showing your alert message.

    Select pages to display alert bar

    When you are done, simply click the ‘Save & Close’ button.

    The last step is to click the toggles to display your alert bar on desktop and mobile devices.

    Enable alert bar on desktop and mobile

    Once that’s done, your alert bar is now ready to collect user email addresses and build your email list.

    You can visit your website to see it in action.

    View thrive leads alert bar

    Method 3: Manually Create an Alert Bar Using Custom HTML/CSS

    What if you don’t want to use OptinMonster or Thrive Leads? In this method, we will show you how to create a notification bar using HTML and CSS code.

    Note: We don’t recommend this method for beginners. If you are new to WordPress or don’t feel confident adding code to your site, then we suggest using either of the methods above instead.

    First, you will need to copy the following custom CSS code for the alert bar:

    <pre class="wp-block-syntaxhighlighter-code">
    .alertbar {
        background-color: #ff0000;
        color: #FFFFFF;
        display: block;
        line-height: 45px;
        height: 50px;
        position: relative;
        text-align: center;
        text-decoration: none;
        top: 0px;
        width: 100%;
        z-index: 100;
    }
    </pre>
    

    An easy way to add CSS code to your website is by using WPCode. It is the best code snippet plugin for WordPress that helps you add custom code to your website.

    Note: WPCode is one of WPBeginner’s own plugins. We created it to make it really easy to add scripts, HTML code, and more to your website pages. It comes with features like a built-in code snippets library, conditional logic, conversion pixels, and more.

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

    Upon activation, you need to head to Code Snippets » + Add Snippet from the WordPress dashboard and select the ‘Add Your Custom Code (New Snippet)’ option.

    The WPCode code snippet plugin for WordPress

    After that, enter a title for your snippet at the top and paste the CSS code into the Code Preview area.

    You will also need to change the Code Type to the ‘CSS Snippet’ option.

    Enter CSS code in WPCode

    Next, you can scroll down to the Insertion section. This is where you can choose where the code will run.

    Since we want the alert bar to appear across the entire website, you can use the default ‘Auto Insert’ method. You can also keep the ‘Run Everywhere’ setting.

    Edit insertion method for code

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

    You will also need to click the toggle on to activate the code.

    Activate and save ad code in WPCode plugin

    After that, go to Code Snippets » Headers & Footer in your WordPress admin dashboard.

    Just copy and paste the following line of HTML code into the ‘Header’ box:

    <div class="alertbar">We are currently closed due to Covid-10.</div>
    

    Here’s how that code should look in the ‘Header’ box in WPCode:

    Insert code to header

    You can change the alert text to anything else you like. Don’t forget to click the ‘Save Changes’ button at the top of the page once you are done.

    Now, you can visit your WordPress blog to see the alert bar. It should appear at the top of every page like this:

    View custom CSS alert bar

    Tip: In a few WordPress themes, your alert bar may overlap your menu. You can alter the height of the bar to 40px or 30px to avoid this. You will also need to reduce the line height accordingly so that your text stays centered vertically in the bar.

    Bonus: Add Custom Alert Messages to WordPress Pages

    If you want to add custom alert messages to different parts of your website, such as product pages, checkout pages, and shop pages, then you can use SeedProd. It is the best website builder and landing page builder for WordPress.

    The plugin offers a drag-and-drop builder to create a custom theme and website pages without editing code. It also offers an Alert block that you can place anywhere on your site.

    This Alert block can warn customers that your stock is running low, particular items are on sale, or other time-sensitive warnings.

    You can simply add the Alert block to your page and then add a title and description. The plugin also lets you add dynamic content, which allows you to insert dates and other query parameters.

    There are also more customization options for the Alert block. For instance, you can change its alignment, adjust the font size, and edit the icon.

    SeedProd alert message

    To learn more about using SeedProd, you can see this guide on how to create custom pages in WordPress.

    We hope this article helped you learn how to create an alert bar in WordPress. You may also want to see our guide on the best WordPress drag and drop page builders to help you further customize your site and the best WooCommerce plugins to grow your store sales.

    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 an Alert Bar in WordPress (3 Easy Ways) first appeared on WPBeginner.

    Go to source

  • Finding Enabled PHP Functions In Your WordPress Hosting Using phpinfo()

    WordPress runs on PHP, so as a WordPress developer, it’s important to understand the PHP functions enabled on the server that hosts your site(s).

    Do you need to set up a plugin or configure an application on a WordPress site and are wondering if a certain PHP function or library is enabled on your server (e.g. cURL)?

    In this tutorial, we’ll show you a quick and easy way to find enabled PHP functions on your server using the phpinfo() function in WordPress. We also provide a comprehensive glossary of these PHP functions for reference, and to help you better understand the backend of your WordPress sites.

    This quick tutorial covers the following:

    What is phpinfo()?

    The phpinfo() function is a built-in PHP function that provides a long list of detailed information about the PHP installation and configuration settings on your server, including all the loaded extensions.

    When phpinfo() is called and executed, it generates a comprehensive HTML page that displays various aspects of the PHP environment, including PHP version, extensions, directives, environment variables, and more.

    The phpinfo() function outputs information in a tabular format, making it easy to navigate and understand the PHP configuration. This knowledge allows you to leverage the available functions on your hosting environment and optimize your WordPress development process.

    The information displayed by phpinfo() can be categorized into different sections that provide specific details about a particular aspect of the PHP environment.

    Some common information you can find using phpinfo() includes:

    1. PHP version: The version of PHP running on the server.
    2. Configuration settings: Various settings and directives defined in the PHP configuration file (php.ini).
    3. Extensions: A list of loaded PHP extensions and their configurations.
    4. Environment variables: Server environment variables and their values.
    5. PHP variables: Information about predefined PHP variables, such as `$_SERVER`, `$_GET`, `$_POST`, etc.
    6. HTTP headers: HTTP request and response headers.

    For a list of all PHP functions enabled on your server, see the tutorial below.

    Notes:

    • Use phpinfo() with caution. While it provides valuable information for development and troubleshooting purposes, it should not be left accessible on a production server. After obtaining the necessary information, we recommend removing or commenting out the phpinfo() function call for security purposes.
    • If you only need to know which version of PHP your server is currently running, you can skip the tutorial below and simply go to the Hosting > Overview tab in The Hub.
    The Hub - Hosting Overview screen - PHP version information.
    Check which version of PHP your server is running from The Hub

    How to Find Enabled PHP Functions On Your Server Using phpinfo()

    By following the steps outlined in this tutorial, you will learn how to easily retrieve a list of information showing all the enabled PHP functions and extensions on your server.

    For this tutorial, we’ll show you how to access the list of PHP functions for a WordPress site set up on WPMU DEV hosting. Note that different hosting environments may use different tools and methods to display this information. Reach out to your hosting support if you have any questions or need help.

    Step 1: Access your WordPress site’s files

    To begin, you need to be able to access the WordPress site’s files stored on your server. You can do this either via FTP or using our File Manager tool.

    Step 2: Create a PHP file

    Next, create a PHP file using a text editor and add the phpinfo() function shown below:

    <?php
    phpinfo();

    You can name this PHP file anything you like. In the example below, we’ve named the file ‘info.php’ (note: avoid using an existing filename found on the root folder of your WordPress installation to prevent overwriting the original file).

    PHP file
    Create a PHP file to call the phpinfo() function.

    Save your PHP file and close your text editor.

    Step 3: Upload the file to your server

    Locate the root directory of your WordPress installation, where the main files like wp-config.php and index.php are located, and upload your file to this folder.

    As mentioned earlier, you can do this easily using our File Manager tool.

    File Manager
    Upload the file to the WordPress install root directory.

    Step 4: Access the phpinfo() output

    Open your WordPress site in a web browser and enter the URL of the uploaded PHP file to generate a PHP function report.

    You should see the PHP information displayed. The output will contain detailed information about the PHP configuration, including all enabled functions on your server.

    PHP function report.
    PHP function report.

    Step 5: Locate the enabled PHP functions

    Scroll down the phpinfo() output to find a specific function. Typically, you will find a list of all enabled PHP functions along with their respective settings and configurations in the section labeled “Core.”

    That’s all there is to it!

    Refer to the Glossary section below if you need to look up any of the functions listed in your generated PHP function report .

    Glossary of PHP Functions

    This glossary provides a list of various PHP functions and their applications. Feel free to bookmark this page and use it as a quick reference guide to better understand the backend of your WordPress sites.

    Configuration

    This function deals with setting up PHP to work with the Internet server and to define settings within your PHP scripts.

    • bcmath – This module enables arbitrary precision mathematics in PHP.
    • calendar – This function of PHP allows conversions between various calendar formats.
    • cgi-fcgi – Command for PHP when run in CGI or FastCGI mode.

    Core

    These are basic PHP functions and classes that form the core of the PHP language.

    • ctype – A library of PHP that checks if the data type of a variable is a valid character type.
    • curl – Used for transferring data with URLs and is the backbone of multiple functions in PHP.
    • date – A group of functions that let you retrieve or format the local or GMT date and time in PHP.
    • dom – A PHP extension that provides a robust, powerful DOM (Document Object Model) XML API.
    • exif – PHP function used to work with image metadata.
    • FFI – Foreign Function Interface is an extension that provides a simple way to call native functions, access native variables, and create/access data structures defined in C libraries.
    • fileinfo – A PHP extension that helps you to identify a file’s mime type.
    • filter – This function filters data by either validating or sanitizing it which aids in securing a PHP application.
    • ftp – FTP PHP functions help establish a connection to a remote FTP server, a crucial part of file sharing.
    • gd – A library used for dynamic image creation.
    • gettext – An extension aimed at the internationalization of PHP scripts by providing translation support.
    • gmp – This is a PHP extension for arbitrary precision mathematics.
    • hash – This function is used to generate a hash value from a string.
    • iconv – Provides an interface to the GNU iconv library, which provides conversion of character sets.
    • igbinary – An alternative to PHP serializer with better performance and smaller size.
    • imagick – A PHP extension that allows working with ImageMagick, a robust software suite to create, edit, and compose images.
    • imap – This function provides an API for talking to the internet mail servers using PHP.
    • intl – This extension helps to perform UCA-conformant collation and date/time/number/currency formatting in PHP.
    • json – JSON functions in PHP allows for encoding and decoding JSON data.
    • ldap – LDAP functions connect, bind and disconnect from an LDAP directory.
    • libxml – A foundation library that offers a set of APIs for manipulating XML, including parsing XML documents and support for other document types like HTML.
    • mbstring – A non-binary string handling extension that provides multibyte specific string functions.
    • mcrypt – Provides a variety of encryption functions.
    • memcache – Memcache module provides handy procedural and object-oriented interface to memcached, high-performance, distributed memory object caching system, generic in nature but intended for use in speeding up dynamic web applications by alleviating database load.
    • memcached – An extension for interfacing with memcached via libmemcached library.
    • msgpack – Provides an interface to msgpack.org, which is a binary-based efficient object serialization library.
    • mysqli – A database driver used to interact with MySQL databases.
    • mysqlnd – It’s the MySQL native driver for PHP.
    • openssl – A robust PHP function used for generating and verifying digital signatures.
    • pcre – Provides functions for ‘perl-compatible regular expressions’.
    • PDO – PHP Data Objects is a database access layer providing a uniform method of access to multiple databases.
    • pdo_mysql – A driver that implements the PHP Data Object (PDO) interface to enable access to MySQL databases.
    • Phar – An archive format combined with a runtime library to help build and load PHP applications bundled into a single file.
    • posix – Accessors to the POSIX (Unix) system calls.
    • readline – Provides an interactive line editing capabilities and history functions.
    • redis – A PHP extension for interfacing with Redis, a high performance key-value storage service.
    • Reflection – A PHP extension, allows inspection and reverse-engineering of PHP programs using a process called “reflection”.
    • session – This function enables user session management.
    • shmop – A simple interface for accessing shared memory segments in PHP.
    • SimpleXML – An extension that simplifies the work of reading XML files.
    • soap – SoapClient is a PHP built-in class providing methods for sending SOAP requests and receiving SOAP responses from a URL.
    • sockets – PHP socket functions let you create and manage network sockets, low-level network communications between servers.
    • sodium – Sodium is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing and more.
    • SPL – The Standard PHP Library (SPL) is a collection of interfaces and classes that are part of PHP core.
    • standard – These are built-in functions and classes provided by PHP which do not rely on external dependencies or PHP extensions.
    • sysvmsg – It provides an interface to System V message queues.
    • sysvsem – Offers access to POSIX-style semaphores.
    • sysvshm – Provides shared memory functions.
    • tokenizer – The tokenizer functions provide an API that allows converting PHP source code into an array of tokens.
    • xml – XML (eXtensible Markup Language) Parser functions let you parse XML documents.
    • xmlreader – An extension that pulls data in and pushes it back out again.
    • xmlrpc – PHP implementation of XML-RPC protocol used in exchanging data across a network.
    • xmlwriter – An extension to create XML documents using a simple ‘constructor-like’ style.
    • xsl – XSL is a language for expressing style sheets to transform XML documents into other XML documents.
    • Zend OPcache – An open-source component that improves PHP performance by storing pre-compiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.
    • zip – PHP zip extension is used to read, write, and manipulate zip archives.
    • zlib – Provides access to zlib compression library.

    Additional Modules

    These are the underlying software components or libraries that add various functionalities to the PHP scripting language.

    Environment

    Involved in setting up, configuring, and managing the PHP runtime environment.

    PHP Variables

    These are used to store data which can be modified during the execution of your script.

    DIY or Use Our Support Team

    Learning PHP will enhance your ability to troubleshoot, modify and optimize your WordPress site.

    Hopefully, this tutorial will come in handy if you need to do a quick look up of your server’s enabled PHP functions. Of course, if your WordPress sites are hosted with WPMU DEV, you can always reach out to our 24/7 support team for expert assistance on anything WordPress and hosting related, or get instant answers with our AI-powered assistant.

    And rest assured, our hosting is configured to work with just about all WordPress plugins, applications, and configurations.

    Go to source