EDITS.WS

Tag: tutorials

  • The Dos and Don’ts of Domain Registration

    When it comes to domain registration, there are some dos and don’ts of how to go about it properly. This article shows you what you need to know to lead you to a good domain name.

    It goes without saying, choosing a domain name is a crucial decision. After all, it’s your website’s calling card that you want to be attractive, relevant, and effective. It can boost SEO, increase your brand awareness, and raise the number of site visitors when created well.

    A good domain establishes authority and credibility, reinforces brand identity, and promotes your business. On top of that, you want to ensure it’s safe!

    This article covers the Dos and Don’ts of domain registration to help ensure your domain name is top-notch and sets up your site for success.

    We’ll cover:

    After reading this article, you should know… wait for it… what to do.

    Dos

    Pick Correct Domain Extension

    Deciding upon the perfect Domain Extensions, aka TLDs (top-level domains), will affect your online presence and overall business.

    Beyond .com, there are numerous other domain extensions available. Everything from .edu, .gov, .blog – and plenty more. Each extension can be used to associate with your brand (e.g. .org is great for organizations).

    Pick a domain extension related to your business, organization, or personal site – whatever it may be. This lets readers know what your website is about from the very beginning.

    A safe bet is typically .com if you can’t decide on other extensions that might be more beneficial. It’s the most popular extension and is recognized universally.

    However, go with your niche if you want to be more specific.

    Make It Easy and Foolproof

    Don’t go crazy and make a domain that’s hard to type or not easy to remember. Be sure to make it foolproof because, well, typos happen to the best of us.

    If you choose a domain that’s different or painful to type, it will hurt your business and brand.

    Misspelled domains lead visitors to the wrong site, 404 errors, and frustration. If you’re lucky, they may try again to find your website. But, chances are, they’ll give up and you lose a visitor.

    Avoid slang (“4” instead of “for”), and don’t use words with numerous spelling options. Don’t mix numbers with words, avoid abbreviations, and don’t use homonyms (e.g. “write” and “right”).

    In a nutshell, use common vocabulary, and make it easy to spell and type – without the user having to think about it too much.

    Make Sure It’s Registered In Your Name or Business

    When registering domain names, you often don’t second guess the registration process and may overthink what name to put it under. However, it’s essential to put it under your name or business — depending on your purpose.

    This ensures that you’ll have control over it for the long term. You can keep or sell it as long as you want.

    If it’s under someone else, you may have to buy it from an individual or company. It’s best to ensure you’re in control right from the start.

    Make a Memorable Impression

    Making a good first impression is important and easy to do with a good domain. There are just a few things you should do. After all, your domain will be out there in the ether with millions of others, so it’s important to be seen amongst the competition.

    One is to make it unique – so it stands out. Whatever your domain is, having it be unique and memorable is a key factor. Something catchy is especially important (e.g. boredpanda, JoeKnowsCoffee).

    Think of one of your favorite websites. Does it have a catchy title? Chances are, it does.

    Also, it’s best to keep a domain as short as possible; however, if a longer domain makes yours stick out and “pop”, it may be worth doing.

    Use Keywords

    Like domain extensions, Keywords in your domain name help tell visitors what your website is about.

    An example might be if you run a WordPress development agency, insert ‘agency’ and ‘WordPress’ (or ‘wp’) somewhere in the name.

    If you need assistance with coming up with a domain name, there are tools like Zyro or NameStudio to help generate a name for you. They work by simply inputting keywords and then coming up with names.

    Also, a lot of domain providers offer ideas for a new domain. For example, when you enter a new domain with us, we give you some suggestions for what you might want to use.

    Domain suggestions
    These are just a few examples.

    Whatever name you choose, keep in mind that keywords can help show what type of website you are, making it more likely that a visitor will be interested in stopping by.

    Make It Long-Term

    Considering your website and domain are for the long-term, it’s important to contemplate a domain name and not rush it.

    After all, you’ll use this for your brand and SEO for years! So, choose something relevant to your business that will continue to work down the road.

    A good example of what NOT to do would be to name your company BobsFurniture2023.com or something with a specific time stamp.

    Your domain should define your business, so ensure your domain has lasting appeal.

    Know Your Market

    If you know your target market, coming up with a domain name is easier.

    This is another example of keywords – choose words that relate to your audience. For example, do you have a pet shop in Palm Springs? Maybe PalmSpringsPets.com. It’s relatable for the audience you’re after, memorable, and simple.

    And the more specific, the better.

    Be Creative

    Get creative when choosing a domain. Why? Because you’ll be more memorable and attract visitors.

    Wordplay, synonyms, and catchy combinations can do a lot to make your website stand out. Think of some of the most popular websites – like YouTube, TikTok, or DuckDuckGo. Each one has a creative edge to it that is memorable.

    So, get creative and create unique words, phrases, and ideas when deciding on your catchy domain.

    Keep It Safe

    Finally, in our Dos — when registering a domain, use a reliable domain provider, lock your domain name, and activate domain privacy. Be safe.

    You can do much to keep your domain protected from being hijacked and taken over. Read our Ultimate Guide to Domain Name Security for more information.

    Now that you know what to do, it’s time for the…

    Don’ts

    Use Certain Characters

    Using unnecessary characters, such as hyphens, symbols, and numbers is a death knell for some websites.

    These often make for a sloppy longer address that doesn’t come across as professional. Also, they’re hard to type and pronounce. So, don’t use certain characters (like the ones mentioned).

    That said, IF you need to use a special character, try to limit it (one would be best).

    If you’re using numbers, try to make them sequential (e.g. 123) or recognizable so that it’s easy on the eyes of visitors.

    Special characters, complicated numbers, and symbols can frustrate a user trying to type it in, and they may bail on getting to your website sooner rather than later.

    Be Complex, Long, Bland, or Hard to Type

    We mentioned long domain names could be okay if they’re relevant but don’t make them complex, bland, or hard to type (which we also touched on).

    A good example is if you’re, let’s say, a physicist. “Physicist” isn’t exactly an easy word to spell if you’re not used to doing so, so you’d probably want to avoid a domain name like “localphysicist.com” or something like that.

    If it’s not clear by now – the easier, the better. Long domains can work but have a good reason if going that route.

    Be Trendy

    It might be tempting to use buzzwords, but they often don’t have staying power. Things can rapidly go from the hottest trend to nothing tomorrow. Just think about viral videos, songs, shows, etc. One minute they’re hot – the next, they’re not.

    So, don’t be too trendy with your domain, even though it might seem cool and mainstream at the time.

    Try to Be Like Someone Else

    Once in a while, someone tries to make their domain similar to a popular one to ride on their success.

    This tactic is usually pretty obvious (e.g. if you name your site Bamazon.com – or something like this) and it will ultimately hurt your reputation and brand. Plus, it gets old – fast.

    This is your time to shine with your unique domain, so don’t try to ride someone else’s coattails.

    Buy All of the Extensions

    Owners of businesses want to protect their brand, and buying up almost any combination of extensions for a domain can be tempting. It helps ensure no one else will grab them.

    But don’t buy all the extensions. As enticing as that is, it’s not necessary.

    This can cost you thousands of dollars, and the benefits are few. There is practically no way you can buy up all the extensions, so you might as well not even attempt it.

    Your brand will be fine with your chosen domain, and, more than likely, no schmuck will steal your thunder by choosing another TLD with your name attached.

    If you’re buying a new domain name or one used before, you should check out the backlink history completely. The backlink history of a domain is important because it can affect how it will rank.

    If there are hesitant backlinks in the past, search engines might remember them and negatively impact rankings. The backlinks could’ve been blocklisted for spam or other bad activity.

    There are backlink checkers, like Majestic, that can ensure you have a solid domain with no unsavory history.

    Doing the Dos and Don’ts for Domains

    When it comes to domain registration, these Dos and Don’ts can help ensure you have success. Whether picking the right TLD, excluding special characters, or security, there’s a lot to consider. After all, this domain is in it for the long haul.

    Consider registering a domain with us for security, selection, and wholesale price. You have domain management in The Hub, 24/7 support, client billing options, resell capabilities, and more!

    Be aware of what to do when deciding on a domain, and you’ll be domain-ate online.

  • How to Restrict Content By Member in WordPress

    How to Restrict Content By Member in WordPressAre you looking to limit/restrict access to certain parts of your WordPress site? In this article we’ll show you how you can restrict your site’s content based on who is logged into your website using popular WordPress plugins. In other words how to setup a membership style website with WordPress. There are many reasons to create a […]

    The post How to Restrict Content By Member in WordPress appeared first on WPExplorer.

  • How to Display Author’s Twitter and Facebook on the Profile Page

    Want to display your author’s Twitter and Facebook links on their WordPress profile page?

    By default, WordPress user profile pages don’t include fields for adding social media profiles such as Facebook or Twitter.

    In this article, we will show you how to easily display your author’s Twitter and Facebook profile links in WordPress.

    How to Display Author's Twitter and Facebook on the Profile Page

    Why Display Author’s Twitter and Facebook Profiles on Your Site?

    Social media platforms are an important source of traffic for your WordPress website. That’s why we put together a social media cheat sheet that will help you set up your social media profiles the right way.

    Your authors will also have their own social profiles, and you can display them on your site to build credibility with your readers and strengthen your site’s authority.

    Your visitors will be able to follow their favorite authors on social media and discover new articles on your site sooner. You can also add their social media profiles to your site’s schema, boosting your site’s trust score on Google and other search engines.

    With that being said, let’s take a look at how to display an author’s Twitter and Facebook links on their user profile page.

    Some of the best WordPress themes will display an author info box below each article. You can use this feature to display simple links to your author’s social profiles.

    Simply go to Users » All Users in your WordPress admin panel and click the name of the author, or the ‘Edit’ link underneath to open the Edit User page.

    Click on a User in the All Users List

    Next, you should scroll down to the ‘About the user’ section and look for the ‘Biographical Info’ box.

    If it is there, then your theme has built-in support for an author box.

    Adding HTML Social Links to the User Bio

    Here you can type a description of the author using text or HTML. You can manually add HTML links for the author’s Twitter and Facebook profile URLs, like this:

    ADD BIO HERE. Follow them on <a href="https:/twitter.com/USERNAME">Twitter</a> and <a href="https://facebook.com/USERNAME">Facebook</a>.
    

    Make sure you add a short biography about the author and change ‘USERNAME’ to their actual Twitter and Facebook usernames.

    Once you’re finished, don’t forget to scroll to the bottom of the page and click the ‘Update User’ button to store your settings.

    You will now see Twitter and Facebook links with the user’s bio on the posts that they write. Here’s how it looks on our demo website:

    Preview of Author Bio with Twitter and Facebook Links

    Method 2: Displaying Social Icons With an Author Bio Box Plugin

    If your theme doesn’t display an author bio box, or if you want one that is more customizable and displays social icons instead of links, then you can use a plugin.

    Simple Author Box is the best free author bio box plugin. It lets you customize nearly every aspect of your author bio box, including adding social media links for your authors.

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

    If you want even more features, then there’s a pro version that lets you display an author box before or after content, add website links, get more social icon styles, include guest authors and co-authors, and more.

    Upon activation, the plugin adds social media fields to each user profile. Simply navigate to the Users » All Users page in your WordPress admin area and click on the author’s name or the ‘Edit’ link below.

    Click on a User in the All Users List

    Tip: To quickly edit your own user profile, you can go to the Users » Profile page.

    When you scroll to the bottom of the author profile, you will notice some new fields that have been added by the Author Bio Box plugin.

    Scroll until you see the section labeled ‘Social Media Links (Simple Author Box).’ Now you need to select ‘Facebook’ from the drop-down menu, and then paste the URL to their Facebook profile into the next field.

    Adding a Facebook Profile Using Author Bio Box

    Now you can click the button labeled ‘+ Add new social platform.’

    A new drop-down and field will be added where you can add their Twitter URL.

    Adding Facebook and Twitter Links Using Simple Author Box

    Once you’ve done that, make sure you click the ‘Update User’ button to store your settings.

    Note: Don’t worry if the Facebook and Twitter URLs vanish after clicking the button. At the time of writing, there is a minor bug that hides the URLs, but the settings have been saved.

    Now Facebook and Twitter icons will be displayed with the author’s profile at the bottom of their posts. Clicking these icons will take your visitors to their social profiles, but these links will open in the same window as your blog.

    Preview of Simple Author Box with Social Icons

    If you would prefer that the links open in a new tab, then you can navigate to the Appearance » Simple Author Box page and then click on the Elements tab. Once there, you need to find the option to ‘Open social icon links in a new tab’ and toggle it to the on position.

    Open Simple Author Box Icons in a New Tab

    Now the author’s social profiles will open in a new tab.

    Method 3: Adding Social Profiles to Your Site’s Schema for SEO

    All in One SEO (AIOSEO) is the original WordPress SEO plugin that’s used on over 3 million websites. It can also be used to add social profile fields on the author’s profile page.

    Unlike the other methods, this method will improve your website’s SEO since AIOSEO adds these social profiles to your site’s schema markup.

    The problem is that AIOSEO does not automatically display them in the author bio. But don’t worry, we will show you how to do that.

    For this tutorial, we’ll use the free version of All in One SEO since it allows you to add social profiles for your website and each user. However, AIOSEO Pro offers even more features to help you rank better in search engine results pages.

    The first thing you need to do is install the free All in One SEO Lite plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

    Once you have the AIOSEO plugin set up, you need to head over to the Users » All Users page, and then click on the author’s name or the ‘Edit’ link just below.

    Click on a User in the All Users List

    This will open the Edit User page for that author.

    Notice that AIOSEO has added a Social Profiles tab at the top of the page. You need to click on that tab now.

    All in One SEO Social Profiles Tab

    You can now enter the URL to the user’s social profiles in the boxes provided, such as:

    https://facebook.com/johnsmith345
    
    

    Note that simply adding the username is not enough.

    Alternatively, if the author uses the same username on multiple social networks, then you can click the box labeled ‘Use the same username for multiple social networks.’

    Quickly Adding Multiple Social Networks With Same Username

    You can then type in that username and check the social networks it is used on. For other social networks, you can simply type the full URL as before.

    Once you are done, click on the ‘Update User’ button at the bottom of the page to store your changes.

    Pro Tip: If you have Twitter and Facebook profiles for your business or website, then you can add these to your site’s schema in a similar way by visiting All in One SEO » Social Networks and adding the links on the Social Profiles tab.

    The author’s social media profiles have now been added to your site’s schema, helping search engines understand your site better. But they are not yet being displayed on your website.

    Displaying AIOSEO Author Twitter and Facebook Links in Your Theme

    Now you need to display these fields as links in your theme.

    If you are an advanced user, then you can display links from All in One SEO’s social profiles by editing your WordPress theme files. If you haven’t done this before, then check out our guide on how to copy and paste code in WordPress.

    Note: If you’re not familiar with editing your theme’s core files and adding custom code, then we recommend you use AIOSEO to add the social profiles to your site’s schema, and then display them on your website using method 1 or method 2 above.

    Advanced users can add the following code to your theme files where you want to display the author profile links.

    <?php
    $twitter = get_the_author_meta( 'aioseo_twitter', $post->post_author );
    $facebook = get_the_author_meta( 'aioseo_facebook', $post->post_author );
    echo '<a href="' . $twitter .'" rel="nofollow" target="_blank">Twitter</a> | <a href="'. $facebook .'" rel="nofollow" target="_blank">Facebook</a>';
    ?>
    

    Save your changes and view a post on your website.

    Here’s how it looks on our demo website. We added the code snippet to the biography.php file in the template-parts folder of the Twenty Sixteen theme.

    Displaying AIOSEO Social Profiles in Your Theme Using Code

    We hope this article helped you learn how to display the author’s Twitter and Facebook profile links in WordPress. You may also want to see our guide on how to display recent tweets or how to display your Facebook timeline 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 Display Author’s Twitter and Facebook on the Profile Page first appeared on WPBeginner.

  • How to Improve the Performance of Large WordPress Sites

    If you’re running a larger WordPress site, you may be facing performance challenges that can impact user experience and search engine rankings. Fortunately, there are several steps you can take to improve your site’s speed and performance. This article covers some of the most common performance challenges for larger WordPress sites and provides tips and solutions for addressing these.

    Growing pains… some should be so lucky to have them!

    Let’s talk about how to manage a WordPress site that is growing too quickly too soon and causing you or your clients all sorts of pains and problems.

    If the issue is temporary, such as dealing with an unexpected traffic spike from a post gone viral (another thing we should be so lucky to experience!), then knowing how to scale your WordPress site when traffic soars can fix this.

    However, if problems persist, it may take more than a couple of aspirins and calling the doctor in the morning to make the headaches go away.

    In this article, we’ll cover:

    WordPress Enterprise Development Challenges

    Q: How complex can you make a WordPress site?

    A: Very.

    When it comes to building large and complex sites, WordPress’s capacity to handle it is not an issue. As WordPress enterprise developer and global SME business adviser Mario Peshev states in his excellent article on building large and complex sites using WordPress

    “WordPress is a proven CMS that handles various applications handling millions of users and tens or even 100M views a month.”

    As Mario also states…

    “Scaling from 10M to 50M is feasible, 50M to 100M is challenging, 100M–200M is quite complex and 200M+ may require some serious engineering effort.”

    So, the capacity of the WordPress CMS platform to handle large and complex sites is not a problem.

    The issue is having the skills to handle WordPress enterprise development challenges.

    As most developers know, WordPress is not only a widely popular content management system known for its flexibility, ease of use, and affordability, but it is also an excellent platform for small businesses and startups that want to establish a web presence quickly and easily.

    However, when it comes to enterprise-grade WordPress development, the amount of information available is as scarce as a developer who hasn’t resorted to cursing loudly at their code editor at least once.

    So, before we get into diagnosing the challenges and issues of dealing with large WordPress sites, let’s explore some of the challenges of finding relevant information on WordPress enterprise development.

    Here is a summary of the points Mario Peshev makes in his article…

    Scarcity of Information on Enterprise-Grade WordPress Development

    One of the main reasons why information on enterprise-grade WordPress development is scarce is that only a handful of agencies specialize in building WordPress platforms, applications, plugins, or performing migrations and integrations for the enterprise.

    Most vendors profile in small business websites, and only a small chunk of the service providers work with enterprises.

    Furthermore, those consultants and agencies often don’t have the time and resources to write tutorials and share their know-how with the industry, or they just don’t care, especially more hardcore engineers who don’t want to bother.

    Another reason why information on WordPress enterprise development is limited is that WordPress is often not the core application that enterprises use in the first place. It’s another obstacle for many, like working on the front-end interface as 1% of the main platform running behind the scenes.

    However, WordPress developers who want to bid on enterprise projects can focus on several different areas to enhance their expertise.

    Focus on Different Areas for Enhancing Expertise

    The first area that WordPress developers should focus on is studying the WordPress Core, APIs, and the surrounding ecosystem in-depth. This will give developers a deeper understanding of the platform and how it works.

    They should also make sure that they’re comfortable with WordPress coding standards and best practices. This will ensure that the code they write is maintainable and easy to read.

    The second area that WordPress developers should focus on is practicing in the main technical areas that enterprises care about, such as performance, security, scalability, and backward compatibility.

    Enterprises have high expectations, and it’s essential to demonstrate that you have the expertise to meet their requirements.

    These WordPress development resources will help you gain these valuable skills and expertise:

    Strategic Players in the Field

    Hosting vendors are strategic players in the field and occasionally work with high-scale applications. Developers can browse their resources and follow their blogs, knowledge base articles, and the like. WordPress is a platform built on top of PHP and SQL, front-end served through HTML, CSS, JavaScript. It runs on a web server like Apache or Nginx using mod_php or php-fpm, connected to a MySQL database on a Linux server.

    Most of the heavy lifting for enterprises happens on top of those layers. Therefore, it makes sense to dive deeper into their own communities and resources stressing on those topics.

    Follow WordPress Core Contributors and Employees

    It always helps to follow WordPress Core contributors, employees at enterprise-grade companies, and the blogs of the leading agencies working with enterprises. You may find some relevant case studies, interviews with clients, or other top engineers that could help you improve even further.

    Now that we’ve looked at the first challenges, which is acquiring the expertise to handle large and complex WordPress sites and meeting the expectations of enterprises, let’s turn to addressing common performance issues you may experience working with large WordPress sites.

    Common Performance Challenges for Large WordPress Sites

    WordPress is used by some of the biggest and most well-known companies, celebrities, and brands in the world, like Intel, Pepsi Cola, PlayStation, American Express, TechCrunch, Fisher-Price, Beyonce, Justin Timberlake, Usain Bolt, and many more.

    Someone has to look after these large sites… why not you?

    While browsing through WPMU DEV’s member forums (which, by the way, is a treasure trove of information for web developers), I came across this post from WPMU DEV member Charly Leetham, which I am reproducing in full below:

    ***

    I was contacted by a long term client asking for assistance with their client.

    The end customer is setting up a rather large website in WordPress and they were having no end of difficulties in keeping the site running. It was so bad, that they had to reboot their Amazon EC2 instance regularly (several times a day regularly).

    With trepidation I agreed to take a look and see if I could help. What I found has left me … saddened. For the client, mostly.

    The site:

    • Database: 4Gigabytes (after optimization)
    • Posts / Pages and other content: Over 900K entries.

    This is not a small site.

    It was built in Elementor which initially left me concerned, as I know that Elementor is resource hungry.

    The EC2 instance was provisioned with 140 Gig storage and 32 Gig memory. More than enough, right? One would think so.

    The business had been moved to EC2 by a consultant who had promised them it would improve their performance. Then they told them that the reason the instance kept hanging was because of the high number of transients that were being created.

    They created a cron job that deleted the transients every hour and with very little improvement.

    I’ve found a number of things during my investigations but the three most concerning things are:

    1. Although the server was provisioned with 32G of memory. PHP had been limited 2G and WordPress had been limited to 40M.

    It’s no wonder they were having trouble.

    Increasing these limits has stopped the hanging but we’re still experiencing memory overflows.

    2. The database was provisioned on the same server.

    Splitting the database onto a RDS (remote database server) should provide more performance increases.

    3. No optimization or performance improvement work had been done.

    By implementing Hummingbird, I’ve been able to improve the load time of the site and that’s without doing anything really hard core. That’s still to come.

    The main thing I want to highlight for others here, is that it’s the incremental knowledge you bring to the table when working with clients.

    Yes, people can build their own WordPress sites but few people can really make them hum. That takes experience and a lot of work.

    ***

    Charly’s forum post is a great example of some of the typical performance challenges you can expect when working with larger WordPress sites and provides a number of useful insights into handling these.

    To address these challenges, let’s first summarize the main technical issues Charly described when looking at this client’s site:

    1. The end customer is setting up a rather large website in WordPress with over 900k entries and a 4GB database after optimization, which is not a small site.
    2. The website was built in Elementor, which is resource-hungry and requires a lot of server resources.
    3. The EC2 instance was provisioned with 140GB storage and 32GB memory, but PHP had been limited to 2GB and WordPress had been limited to 40MB, causing performance issues and memory overflows.
    4. The database was provisioned on the same server, which caused performance issues. Splitting it onto a remote database server should provide performance improvements.
    5. No optimization or performance improvement work had been done. By implementing Hummingbird, Charly was able to improve the site’s load time.
    6. The incremental knowledge and experience brought to the table by an experienced web developer is crucial for optimizing and improving the performance of WordPress sites, which can be complex and require a lot of work to make them run smoothly.

    We’ve already addressed point #6, so let’s go through the other issues on the list above.

    Large WordPress Site Performance Issue #1 – WordPress Database

    As your WordPress site grows, so does the size of its database. Your WordPress database can become quite large and may start causing some issues.

    Managing a large WordPress database can be a daunting task, so let’s take a look at some of the challenges, best practices, strategies, and solutions for managing your WordPress database on larger sites.

    The challenges of having a large WordPress database include:

    • Slow page load times: A large database can slow down your website, making it difficult for visitors to load pages quickly.
    • Backup and restore issues: Backing up and restoring a large database can be a challenge, and it may take a long time to complete the process.
    • Database corruption: A large database can be more prone to corruption, which can cause data loss and other issues.
    • Difficulty in database maintenance: Maintaining a large database may require more resources and expertise to keep it running smoothly.

    Here are some strategies and best practices managing WordPress databases on larger sites:

    Initial Configuration

    Before you even start thinking about managing your database, it’s important to make sure that it’s set up correctly. When you install WordPress, it creates a new database for you. However, if you’re running a large site, you may want to consider using a separate database server. This will help to improve performance and reduce the load on your web server.

    When configuring your database, it’s important to choose the right settings. In particular, you’ll want to pay attention to the database character set and collation. These settings can affect how your content is displayed on your site, so it’s important to get them right from the start.

    Where to Keep the Databases

    When managing a large WordPress site, you’ll want to think carefully about where to keep your databases.

    There are a few different options to consider:

    • Local Database: You can keep your database on the same server as your website. This is the simplest and most common option, but it can lead to performance issues as your site grows, as Charly referred to in the client example above.
    • Remote Database: You can keep your database on a separate server, either within your own network or in the cloud. This can improve performance, but it can also increase costs.
    • Managed Database: You can use a managed database service, such as Amazon RDS or Google Cloud SQL. This can be a good option if you don’t have the expertise to manage your own database.

    Database Access Time with Large Numbers of Records

    As your WordPress site grows, the size of your database can have an impact on how quickly your site loads.

    When you have a large number of records in your database, queries can take longer to run, which can slow down your site.

    Caching can help speed up your website by storing frequently accessed data in memory, reducing the need to access the site’s database and PHP. This, of course, depends on the kind of caching being used, e.g. database caching (which includes object caching) or page caching (where the cache of the web pages is stored and presented when a specific page is requested later without needing to be processed by PHP and MySQL).

    To improve performance, you can use server-side caching, caching plugins that manage server-side caching solutions, or standalone caching plugins. Our performance-optimizing plugin Hummingbird, for example, has its own caching but also integrates with WPMU DEV’s server-side caching.

    Caching can have a significant impact on site performance, particularly for larger sites. However, setting up and managing caching can be complex and time-consuming.

    Also, it’s important to regularly monitor your site’s performance to ensure the caching is optimized for your specific needs.

    To learn more about caching solutions, check out our Ultimate Guide to WordPress Caching.

    Another option is to use a technique called “sharding,” which involves splitting your database into smaller pieces. This can help to improve performance by spreading the load across multiple servers.

    Techniques for Splitting the Data Up

    If you’re using a technique like sharding, you’ll need to decide how to split your data up. One option is to split your data by category or tag. For example, you could have one database for posts related to technology, and another for posts related to entertainment.

    Another option is to split your data by date. This can be particularly useful if you have a lot of older content that doesn’t change very often. You could have one database for posts from the last year, and another for older posts.

    Consider also using a plugin like HyperDB. HyperDB is maintained by Automattic, the parent company of WordPress.

    As described on the plugin page…

    HyperDB allows tables to be placed in arbitrary databases. It can use callbacks you write to compute the appropriate database for a given query. Thus you can partition your site’s data according to your own scheme and configure HyperDB accordingly.

    Basic Indexing

    Indexing your database can help to improve performance by making it faster to search for data. When you create an index, the database creates a data structure that makes it easier to search for specific values.

    To create an index, you’ll need to use the MySQL command line or a tool like phpMyAdmin.

    When you’re creating an index, it’s important to choose the right columns to index. Typically, you’ll want to index columns that are frequently used in queries.

    You can also use a plugin like Index WP MySQL for Speed. This plugin adds database keys (also called indexes) to your MySQL tables to make it easier for WordPress to find the information it needs. The plugin page also includes excellent information on database indexing in relational database management systems.

    Settings and Logs to Check

    To keep your database running smoothly, there are a few settings and logs that you’ll want to keep an eye on. These include:

    • MySQL slow query log: This log records queries that take longer than a certain amount of time to run. By analyzing this log, you can identify queries that are causing performance issues.
    • MySQL error log: This log records any errors that occur in the MySQL server. By monitoring this log, you can identify and troubleshoot issues that may be affecting your database.
    • WordPress debug log: This log records any errors or warnings that occur within WordPress. By monitoring this log, you can identify issues with your WordPress installation or plugins.
    • Database backups: Regularly backing up your database is important to ensure that you don’t lose any data in case of a server crash or other disaster and can restore your website quickly in case of a problem. You can use a plugin like Snapshot to automate this process, or if you’re hosting with WPMU DEV, you can configure automatic enterprise database backups to perform daily and even hourly. Also, consider storing all backups separately from the server hosting the site, as the backups may be lost if the server crashes.

    Other Ongoing Maintenance

    In addition to the above, there are a few other ongoing maintenance tasks that you’ll want to perform to keep your database running smoothly.

    These include:

    • Cleaning up your database: Over time, your database can become cluttered with unused data. Check our article on how to clean up your database and remove unnecessary data for more details.
    • Optimizing your database tables: Reducing the size of your database and optimizing your database tables helps to improve site performance. You can optimize your database by removing unnecessary data, such as post revisions, trashed items, spam comments, and unused plugins and themes. Check our complete WordPress database optimization guide for detailed instructions and plugins that help you do this.
    • Monitoring your site for security issues: Large sites are often a target for hackers. You can use a plugin like Defender to monitor your site for security issues and prevent attacks.

    In terms of cleaning up your database, Charly mentions a high number of transients as being a possible issue affecting the site’s performance. Although addressing this issue seemed to offer very little improvement in Charly’s client’s case, it’s worth mentioning it here as something to check if you are experiencing issues with your site.

    Transients are a type of cache that stores data in the database for a specific period of time. They are used to speed up the loading time of a website by storing the results of a complex or time-consuming query, such as an API request, so that the query doesn’t have to be run every time the page is loaded.

    Transients have a set expiration time, after which they are automatically deleted from the database. However, if the website is not properly optimized, transients can accumulate in the database and cause performance issues, such as slow page loading times or database crashes.

    To optimize WordPress and avoid issues with transients, there are several steps that can be taken. These include:

    • Use a caching plugin: A caching plugin like Hummingbird can help reduce the number of database queries and prevent unnecessary creation of transients.
    • Delete expired transients: Expired transients can accumulate in the database, so it’s important to regularly delete them to keep the database optimized. This can be done manually, or by using a plugin like Hummingbird.
    • Set a maximum lifetime for transients: By setting a maximum lifetime for transients, you can prevent them from being stored in the database for too long, which can lead to performance issues. This can be done using the set_transient() function in WordPress.
    • Use a remote database: Storing the database on a remote server can help reduce the load on the server and prevent issues with transients.
    • Increase the memory limit: Increasing the memory limit for PHP and WordPress can help prevent memory overflows and performance issues caused by transients.

    No matter what size WordPress site you are working on, using WPMU DEV’s Hummingbird caching and site optimization plugin can help to automatically take care of expired transients and eliminate this issue, leading to faster page loading times and a smoother user experience.

    Hummingbird: Advanced Tools screen with Database Cleanup and Transients options highlighted.
    Hummingbird can be configured to automatically delete expired transients from your WordPress database.

    In terms of increasing the memory limit for PHP, if you are a WPMU DEV member, it’s really easy to check a whole bunch of information about your WordPress site, include current PHP memory limits and max filesize upload settings.

    Just log into your WordPress dashboard and navigate to the WPMU DEV dashboard plugin menu. Select Support > System Information > PHP tab.

    WPMU DEV Dashboard plugin - Support tab.
    WPMU DEV’s Dashboard plugin lets you easily check information about your WordPress site.

    If you are not a WPMU DEV member, you can still check this information manually.

    To find out how much php memory is allocated, create a php and add the following:

    <?php
    phpinfo();
    ?>

    Call it something like php-test.php and upload it to your server.

    Access the file from a browser and search for memory_limit. This will give you two settings – what the local site settings are and what the server default is. It is possible to have different php memory_limits by site.

    For WordPress memory, for instance, you might see the following:

    define('WP_MEMORY_LIMIT', '64M');

    Note that if this entry is missing in the wp-config.php file, then your site is probably working between 40M and 64M.

    In addition to the above, make sure to also scan and fix corrupt or broken files and database in WordPress.

    As you can see, there are quite a number of things you can do to improve the performance of your WordPress database.

    Let’s move on, to…

    Large WordPress Site Performance Issue #2 – WordPress Core, Themes, And Plugins

    Charly mentions that another possible reason for the performance issues her client’s site was experiencing was using a resource-hungry theme.

    Rather than focusing on a particular theme, let’s look at themes and plugins in general (btw… if you use Elementor, check out our article on how to optimize Elementor themes. We’ve also written articles on ways to optimize themes like Divi, WPBakery, Astra, and other page builders.)

    Here are some of the things you can do:

    Theme and Plugin Bloat – Themes and plugins can significantly impact the performance of a WordPress site, particularly if they are not optimized or updated regularly. Some themes and plugins can also be poorly coded, leading to slow loading times and site bloat.

    Solution: Be sure to choose a lightweight and optimized theme that is regularly updated by the developer. Avoid using too many plugins and remove any unnecessary ones to reduce site bloat. Always keep your themes and plugins up-to-date to ensure optimal performance.

    • Avoid poorly coded themes and plugins, as these can lead to slow loading times, site bloat, and conflicts.
    • Choose lightweight and optimized themes and plugins that are regularly updated by their developer.
    • Check your server logs to identify heavy plugins and themes that could be slowing down your site.
    • Always keep your themes and plugins up-to-date to ensure optimal performance.
    • Deactivate and remove unnecessary and non-essential plugins and themes.

    As with all WordPress sites, regardless of size, it’s also really important to optimize your client sites.

    There are a number of tools you can use to scan your site and measure site performance, including Google PageSpeed Insights and GTmetrix. These tools provide important insights into ways to optimize your sites.

    You can also use a developer tool plugin like Query Monitor to help you identify issues, aid in the debugging of database queries, PHP errors, hooks and actions, block editor blocks, enqueued scripts and stylesheets, and HTTP API calls. The plugin also provides advanced features such as debugging of Ajax calls, REST API calls, and user capability checks.

    Query Monitor - WordPress plugin
    Use Query Monitor to quickly identify poorly performing plugins, themes, or functions in your WordPress site.

    Additional articles and tutorials that we recommend checking out include our guide on speeding up WordPress, solutions to forgotten WordPress page speed problems, WordPress troubleshooting guide, and Mario Peshev’s article on scaling mistakes when running a large WordPress site.

    Large WordPress Site Performance Issue #3 – Site Content

    Large WordPress sites typically have loads of content. In Charly’s case, for example, the client’s website had over 900k entries.

    If you’ve gone and optimized the database and you’re still experiencing issues, here are some of the things you can look at:

    • Perform a content audit: A content audit is essentially performing an inventory of your existing content and assessing and identifying content that’s outdated, obsolete, duplicated, etc, before deciding what to do with it (e.g. update, SEO optimize, trash). It’s a long-term but effective and important strategy for keeping your site’s content manageable and maintained.
    • Use lazy loading: Lazy loading can help to ensure that media files are only loaded when they are needed, which can significantly improve page load times.
    • Use a content delivery network (CDN): Consider using a content delivery network (CDN) to distribute cached media files and reduce the load on your server. A CDN can help speed up your website by caching your website’s content on servers located around the world, reducing the load on your server. Popular CDNs include Cloudflare and MaxCDN. Note that all WPMU DEV membership and hosting plans include a CDN. Our Hummingbird and Smush plugins also include a CDN (Hummingbird also offers Cloudflare integration).
    • Use content optimization plugins: Optimize images, videos, and other media files by compressing them and reducing their file size. If the site contains loads of images, consider using an image optimization plugin like Smush, which significantly reduces image file sizes without compromising on image quality to improve content delivery performance. Smush also includes WPMU DEV’s CDN.
    • Use a managed WordPress hosting service: A managed WordPress hosting service can provide you with optimized servers and database management tools to help keep your website running smoothly. As discussed in the next section below, WPMU DEV not only offers a best-of-class managed WordPress hosting service, but it is also specifically configured to deliver enterprise-level hosting for WordPress sites of all kinds and sizes.

    Large WordPress Site Performance Issue #4 – Hosting

    If you are still experiencing problems with the site after fixing issues with the WordPress database and optimizing the site’s core, plugins, themes, and content, the issue may be related to web hosting.

    Consider using a managed WordPress hosting service with a company that specializes in WordPress.

    Hosting with a reputable host not only means placing your site in the care of an experienced team who will handle areas like server optimization and database management for you, but also migrate your existing website to their servers.

    This is very important, as a large WordPress site no doubt has lots of moving parts and active traffic and transactional events taking place, and you don’t want to lose any valuable data or break anything during the migration process.

    Additional hosting considerations for a large WordPress site include the ability to handle demands with ample resources, uptime, speed, and customer support.

    WPMU DEV offers enterprise-level hosting, 24/7 expert hosting and WordPress support, and migrations by a team of experts who will handle everything for you, including troubleshooting any potential issues with your site.

    Additionally, WPMU DEV has been independently rated and reviewed by many users as one of the leading managed WordPress hosting companies, with a near-perfect rating score. G2.com, for example, rates WPMU DEV 4.8 out of 5 stars overall, and 9.8 out of 10 for quality of support.

    More importantly and on a practical level, our expert team proactively manages larger sites by regularly checking areas like “PHP error logs” for any errors in the plugins, themes or in the WordPress core and “PHP slow logs” for slow loading scripts (e.g. plugins where scripts exceed 30 seconds to execute), access logs (to see if there’s a DDoS attack or high visitors in general), and load on the server resources, including CPU, RAM, etc.

    The team also checks if WAF is enabled, caching is ON, and any non-used profiling software is turned off when not needed, and will perform conflict tests for plugins and themes and run query monitoring scans at the mysql level when required.

    We also offer integration with New Relic and Blackfire to profile the site and its pages for all sites, large and small.

    Managing Larger WordPress Sites Is A Big Job

    A large WordPress site differs from other WordPress sites mostly in the scale and complexity of its management.

    Dealing with performance issues in large, complex WordPress sites requires having the skills and the expertise to handle challenges and meet the high expectations of enterprise clients.

    Finding information on WordPress enterprise development can be challenging, but focusing on different areas like studying the WordPress Core, APIs, and the surrounding ecosystem, practicing in the main technical areas, and following leading agencies, will help you become more knowledgeable and confident in your abilities as a developer.

    Also, managing a large WordPress database can be challenging but there are solutions available to help you manage it. By optimizing your database, using caching and CDN services, using a managed WordPress hosting service, and regularly backing up your database, you can ensure that your website runs smoothly and avoid potential issues.

    By addressing common performance challenges and regularly monitoring your site’s performance to identify and address any issues as they arise, you can significantly improve the performance of your larger WordPress site.

    Finally, hosting your site on enterprise-level servers with an experienced and reliable managed WordPress hosting partner like WPMU DEV will not only improve your large site’s performance but also help to eliminate problems and issues, as your site will be expertly managed and monitored 24/7.

    If you are looking to migrate your existing site from another host or upgrade hosting for a large WordPress site, we recommend looking at our enterprise-level hosting plans (3 x Essential and 3 x Premium options), and taking advantage of our hosting buyout and free expert site migration service.

    ***

    Ask Charly Leethan

    Special thanks to WPMU DEV member Charly Leethan for her contribution to this post. AskCharlyLeethan provides ongoing support and advice to help small businesses define and refine their processes and plan and build their web presence using current and emerging technologies.

  • How to Stop WordPress From Overwriting .htaccess File

    Recently one of our readers asked if it was possible to stop WordPress from overwriting the custom code in your .htaccess file?

    WordPress along with several plugins add custom settings to the .htaccess configuration file. If you have added your own custom code to .htaccess, then you may be worried that it will be overwritten or deleted.

    In this article, we’ll show you how to stop WordPress from overwriting the .htaccess file.

    How to Stop WordPress From Overwriting .htaccess File

    Why Does WordPress Overwrite the .htaccess File?

    Your .htaccess file is a powerful configuration file that stores important settings about your WordPress website. It contains rules that tell your hosting server how to handle your site.

    WordPress uses the .htaccess file to store its permalink settings. Whenever you change or regenerate your permalinks, WordPress will automatically overwrite the old settings in .htaccess with the new settings.

    Some WordPress plugins also save their settings in .htaccess. For example, the W3 Total Cache plugin will modify your .htaccess file in order to configure the caching and optimization tools that are part of the plugin.

    Lastly, you can make your own custom changes to .htacess to control how your website works. For example, you can add custom rules to the file that protect your admin area, keep your site safe from hackers, set up redirects, ban suspicious IP addresses, and more.

    Some users are concerned that if they add their own custom rules to .htaccess, then they may be deleted when WordPress overwrites the file with new settings. Other users prefer to manually configure .htaccess and not let WordPress write to it at all.

    With that being said, let’s take a look at how to stop WordPress from overwriting your .htaccess file. Simply use the quick links below to jump to the section you are interested in.

    How to Stop WordPress From Overwriting Your .htaccess Rules

    The good news is that if you understand how the .htaccess file works, then you can be confident that your custom rules will not be overwritten.

    That’s because the areas of the file that will be changed by WordPress or your plugins are clearly marked. Simply make sure that you don’t add code to those areas.

    Don’t Modify Code Inside the WordPress Markers

    As we said earlier, WordPress uses .htaccess to store the settings for an SEO-friendly URL structure. The code it saves to the file will be automatically overwritten and updated whenever you change your permalink settings.

    As you can see in the screenshot below, WordPress saves this information between two markers, # BEGIN WordPress and # END WordPress.

    WordPress Markers in .htaccess

    Notice the warning inside those markers:

    The directives (lines) between “BEGIN WordPress” and “END WordPress” are dynamically generated, and should only be modified via WordPress filters. Any changes to the directives between these markers will be overwritten.

    This means that WordPress will not overwrite or modify any code that you add outside these markers. Users typically add their custom code to the top of the file, above the # BEGIN WordPress marker.

    Tip: .htaccess is a hidden file located in your WordPress site’s root folder. If you are having difficulties finding it, then take a look at our guide on why you can’t find the .htaccess file on your WordPress site.

    Don’t Modify Code Inside Your Plugins’ Markers

    When a plugin saves its settings to .htaccess, it also places it between markers that look like # BEGIN Plugin and # END Plugin.

    For example, if you install and set up the W3 Total Cache plugin to improve your website speed and performance, then it will add rules to .htaccess between # BEGIN W3TC Browser Cache and # END W3TC Browser Cache markers.

    Example of Plugin Markers in .htaccess

    These rules will be overwritten whenever you change the plugin’s settings, so you need to be careful not to add your own custom .htaccess rules between those markers.

    Creating Markers for Your Custom Code

    In rare cases, a badly behaved plugin may modify code outside of its # BEGIN and # END markers. However, it will normally not modify code found between the markers used by WordPress or other plugins.

    If you are concerned about a badly behaved plugin overwriting your code, then you can add your own markers to the .htaccess file.

    For example, you can type # BEGIN MyCustomCode and # END MyCustomCode markers at the top of the .htaccess file, and then add your own custom rules between those markers.

    You Can Create Your Own Markers in .htaccess for Your Custom Rules

    If you also need to add code to the end of .htaccess, then you can add a different set of markers there. Just be sure to give them different names. For example, you could use ‘MyCustomCodeTop’ and ‘MyCustomCodeBottom’.

    How to Stop WordPress From Modifying .htaccess

    Now that you understand how .htaccess works, you can be confident that your custom code will not be overwritten by WordPress or your plugins.

    However, some developers and advanced users want to stop WordPress from making any changes to .htaccess.

    For example, they may want to create permalinks by typing the settings manually into .htaccess. In this case, they will want to avoid conflicts by stopping WordPress from saving its own permalink settings to the file.

    We don’t recommend this unless you know what you’re doing, because it can lead to unexpected consequences. However, it can be done by changing the file’s permissions or using code.

    Stopping WordPress From Changing .htaccess Using File Permissions

    One way to stop WordPress from modifying .htaccess is to make the file read-only. To do this, you need to change the file permissions using an FTP client or the file manager provided by your WordPress hosting provider.

    You will find the .htaccess file in the root directory of your WordPress installation. Next, you should right-click the file and select ‘File permissions’.

    Selecting File Permissions From the Menu in Your FTP Client

    This will display a pop-up where you can change the file’s attributes.

    The default setting will be 644, but you can change this to 444 by typing directly into the ‘Numeric value’ field or making sure that only the ‘Read’ boxes are checked.

    Changing the .htaccess File Permissions to 444 or Read-Only

    Once you click the ‘OK’ button, the file will be read-only and cannot be modified.

    Of course, this will mean that you are unable to write to the file as well. When you wish to make changes, you will need to temporarily set the file permissions back to 644.

    Stopping WordPress From Changing .htaccess Using Code

    Another solution is to use a code snippet that lets WordPress know not to write to the .htaccess file. This is useful if you want to stop WordPress from modifying .htaccess without blocking your plugins.

    Note: Editing any core WordPress files can be dangerous. Even a small mistake can cause major errors on your site. That’s why we only recommend this method for advanced users.

    Simply add the following code snippet at the end of your wp-config.php file. If you need help, then please refer to our guide on how to edit the wp-config.php file in WordPress.

    add_filter('got_rewrite', '__return_false');
    

    Once you’ve done that, WordPress will no longer write to the .htaccess file.

    Error Message Displayed When WordPress Can’t Change .htaccess

    If you try to change your permalink settings when .htaccess is set to read-only, then an error message will be displayed.

    At the top of the Settings » Permalinks page, you will see the message ‘You should update your .htaccess file now.’

    Permalink Settings Error Message When .htaccess Cannot Be Accessed

    This lets you know that WordPress was unable to modify the .htaccess file.

    Normally, this is what you intended. However, if you do wish to add the WordPress permalink settings to .htaccess, then you will need to do it manually.

    At the bottom of the Settings ≫ Permalinks page, you will see another error message saying that your .htaccess file is not writable. Underneath that, you will see the rules that need to be added to .htaccess.

    List of Rules You Will Need to Add to .htaccess Manually if Needed

    If you wish to add those settings, then you will need to temporarily change the .htaccess file permissions back to 644 so that it can be edited. After that, you should paste the rules between the file’s WordPress BEGIN and END markers, replacing the code already there.

    When you’re finished, simply set the value back to 444 and save the file. It will once again be unwritable.

    We hope this tutorial helped you learn how to stop WordPress from overwriting the .htaccess file. You may also want to learn how to add push notification in WordPress and check out our expert list of the best WordPress SEO plugins and tools.

    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 Stop WordPress From Overwriting .htaccess File first appeared on WPBeginner.

  • How to Open a WordPress Popup Form On Click of Link or Image

    Do you want to create a popup that appears when visitors click on a link or an image on your site?

    This is a proven way to grow your email list. It is more effective since it starts with an action taken by a user. Popular sites often use it to offer an optin incentive to get even more subscribers.

    In this article, we’ll show how to open a WordPress popup on click of a link or an image, step by step.

    How to Open a WordPress Popup Form on Click of Link or Image

    What Is an ‘On Click’ Popup Form?

    On-click popup forms are lightbox popups that open when a user clicks on a link, button, or image on your WordPress website.

    Normally, popups appear on websites when a user arrives or when they are about to leave. On-click popup forms are triggered by user interaction.

    We also use on-click popups on WPBeginner to grow our email list. For instance, a popup will appear when a user clicks the email icon in the sidebar next to all social icons.

    On click popup preview

    Why Are On-Click Popup Forms So Effective?

    On-click popup form is effective because it uses the powerful Zeigarnik effect. This is a psychological principle that states users who start an action themselves are more likely to finish it.

    When someone clicks a link or button to trigger your popup, they’ve already shown interest. When the form popup appears, they’ll be more likely to use it.

    For example, you can use an on-click popup to offer a lead magnet. This could be a free downloadable resource like an ebook or PDF file that users can get in exchange for their email address.

    However, there are other ways to use on-click popups on your website. For instance, you can ask users to claim a coupon code, learn more about a product, fill-out surveys, and more.

    That being said, let’s take a look at how to easily make an on-click lightbox popup for your website.

    Creating an On-Click Popup in WordPress

    The easiest way to create an on-click popup is by using OptinMonster. It is the popup plugin for WordPress and lead generation software.

    First, you’ll need to sign up for an OptinMonster account. You’ll need the Pro account (or higher) because it includes the MonsterLinks™ feature that lets you create on-click popups.

    Simply visit the OptinMonster website and click the ‘Get OptinMonster Now’ button to get started.

    OptinMonster

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

    This lets you connect your OptinMonster account to your WordPress site.

    Once you’ve activated the plugin, you’ll need to connect your account. You should be taken to the Welcome page automatically in your WordPress dashboard.

    Go ahead and click the ‘Connect Your Existing Account’ button.

    Connect your existing account

    After that, a new window will open.

    You can click the ‘Connect to WordPress’ button to add your site to OptinMonster.

    Connect OptinMonster to WordPress

    Once you’ve connected your OptinMonster account to your WordPress site, you can create your on-click popup.

    Simply go to OptinMonster » Campaigns from your WordPress dashboard and click the ‘Create Your First Campaign’ button.

    Create your first campaign

    You’ll be taken straight to the OptinMonster website.

    The Campaign Type should already be set to Popup. If not, just click on Popup to select it. Next, you’ll need to choose a campaign template.

    Choose a campaign type and template

    You’ll be able to modify the template exactly how this looks later. We’re going to use the ‘Basic’ template for this tutorial.

    Simply run your cursor over the template and click the ‘Use Template’ button.

    Select the basic template

    Now, you’ll be prompted to enter a name for your campaign. This is just for you. The users will not see it.

    Simply enter a name and click the ‘Start Building’ to create your popup.

    Enter a name for your campaign

    OptinMonster will automatically load up the template in the drag-and-drop campaign builder.

    You can edit the default text and add or remove elements from your template. Simply drag blocks from the menu on your left and drop them on the template.

    Add blocks to onclick campaign

    You can also remove any element in the form by clicking on it and using the menu options to the left. For instance, we will remove the ‘Name’ field from the form.

    First, you’ll need to click on the ‘Optin’ tab at the bottom of the screen. After that, click on the field to select it, and you’ll see the available options in the left column, including the option to remove it.

    Delete name field

    Once you have designed the popup, the next step is to design the Success view, which people see after filling out the form.

    Simply switch to the ‘Success’ view at the top of the screen.

    Edit the success view for onclick popup

    You can edit the success view just like you edited the optin view. For instance, you may want to change the text or include a link to download a lead magnet.

    Connecting Your Popup to Your Email List

    Once you’re happy with your popup, click on the Integrations tab at the top of the screen. You’ll need to link OptinMonster to your email marketing service so that you can add people to your email list.

    From here, click the ‘+ Add New Integration’ button on the left-hand side of the screen.

    Add an email marketing tool

    Next, you can select your email provider from the dropdown list.

    From here, simply follow the instructions to connect it to OptinMonster.

    Select your email provider

    Setting Your Popup to Appear On Click

    Now, you need to configure your popup to appear when the user clicks a link.

    Go ahead and click on the Display Rules tab at the top of the screen.

    Select display rules

    The default display rule set by OptinMonster is ‘time on page.’ This means that the default pop-up will appear after the user has been looking at that page for a certain amount of time.

    However, you can click the dropdown and select the ‘MonsterLink™’ (On Click)’ option instead.

    Select MonsterLink display rule

    After that, you should see your MonsterLink™ in the display rules.

    You can click the button to copy your MonsterLink™ Code. You’ll need this in a moment.

    Copy the MonsterLink

    Making Your On-Click Popup Live

    Next, you can go to the ‘Published’ tab at the top of the page and change your campaign’s status from ‘Draft’ to ‘Publish.’

    Publish your on click campaign

    Once you’ve done that, click the ‘Save’ button at the top of the screen and close the campaign builder.

    Next, you’ll see the ‘WordPress Output Settings’ for your campaign. You can click the ‘Status’ dropdown menu and change it from ‘Pending’ to ‘Published.’ When that’s done, click the ‘Save Changes’ button.

    Change status from pending to published

    Adding Your MonsterLink to Your WordPress Website

    Now, you need to add the special MonsterLink™ to your site. If you didn’t copy this earlier, you can get it by going back to the ‘Display Rules’ setting for your campaign.

    First, you’ll need to create a new post or page, or edit the one where you want to add your link.

    The MonsterLink™ is HTML code, so you need to paste it into a custom HTML block.

    When you’re in the WordPress content editor, click the (+) button to add a Custom HTML block.

    Add a Custom HTML Block to Your Page

    Now, copy your MonsterLink™ into that block. It should look something like this:

    <a href="https://app.monstercampaigns.com/c/mcqdabfqzia6zdiosiz0/" target="_blank" rel="noopener noreferrer">Subscribe Now!</a>
    

    You can change the words ‘Subscribe Now!’ to whatever text you want to use for your link.

    Enter the MonsterLink Code

    Once you’ve placed the link, you can preview your page or post to ensure it’s working.

    Here’s our link in action. Note we’ve applied some styling to the text to create a box with larger text to help promote the lead magnet:

    On click popup preview

    Tip: You’re not limited to just text links using MonsterLinks™. You can also use MonsterLink with call-to-action buttons, images, banners, or navigation menus on your website.

    We hope this tutorial helped you learn how to trigger a WordPress popup form on click. You may also want to see our tutorial on how to speed up your WordPress site and our ultimate WordPress SEO guide.

    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 Open a WordPress Popup Form On Click of Link or Image first appeared on WPBeginner.

  • How to Enable / Activate WordPress Plugins from the Database

    Are you looking to enable or activate plugins from the WordPress database?

    If you are unable to access your WordPress admin area and need to activate a plugin to restore your access, then you can do that from the WordPress database.

    In this article, we will show you how to easily activate your WordPress plugins using the database.

    How to enable/activate WordPress plugins from the database

    When Should You Activate WordPress Plugins Using Database

    A number of common WordPress errors can prevent a website owner from accessing the WordPress admin area. In most of those situations, the user is looking to deactivate WordPress plugins without admin access.

    However in some situations, a website owner may need to activate certain plugins to restore access to their WordPress website.

    For example, let’s assume an error is stopping you from accessing your WordPress dashboard, and you have found a plugin that can fix that error.

    Luckily, WordPress stores the active plugins information in your WordPress database. This means you can manually enter this information directly in the database and tell WordPress to activate a plugin.

    The only condition is that the plugin must be installed on your WordPress site. Which means that it should be present in the plugins folder on your WordPress website.

    With that being said, let’s see how you can easily enable/activate a plugin using the database.

    Step 1. Find Your Database Name Using the Hosting Control Panel

    To activate your WordPress plugins using phpMyAdmin, first, you need to find out your WordPress database’s name.

    Now, to find the name of your database, you need to log in to your web hosting dashboard. For this tutorial, we will be using Bluehost.

    If you are using a different hosting company, then your WordPress hosting dashboard may look slightly different.

    Once you are on the cPanel, scroll down to the ‘Files’ section and click the ‘File Manager’ option.

    Click at the file manager

    This will open up the File Manager in a new window. Here you simply need to locate and click the public_html folder from the left column.

    This will open up all the files that are stored in the public_html folder. Now, you simply need to locate and click the folder with your site’s name on it present under the ‘Name’ column.

    Go to the publich_html file and find your site name

    Some users may instead see their WordPress files and folders installed inside public_html folder.

    After you have opened up your WordPress site’s file, locate the wp-config.php file under the ‘Name’ section and right-click on it.

    This will open up a menu where you need to select the ‘View’ option.

    Click View

    This will open up the wp-config.php file in a new window where you can locate your database details.

    We recommend that you copy and paste your database details including username and password into a notepad on your computer.

    Database details

    Now you’ve successfully found your database’s name, let’s move to our next step.

    Step 2. Locate Active Plugins Option via PhpMyAdmin

    After you have found out the name of your database, you need to go back to your WordPress hosting control panel.

    Once there, scroll down to the ‘Databases’ section and click the ‘phpMyAdmin’ option.

    Click the phpMyAdmin option in the cPanel

    This will launch the phpMyAdmin app in a new browser tab.

    Note: Before you make any kind of changes, please make sure to create a complete backup of your database. It will come in handy if anything goes wrong with the process.

    Next, you simply need to click the ‘Database’ tab from the navigation menu present at the top of the page.

    Now, simply locate your WordPress database and click on the browse button to expand it.

    Click the Database tab from the navigation menu

    This will show your WordPress database tables.

    Here, you will simply need to locate wp_options table and click browse next to it.

    Note: By default, WordPress uses wp_ as the prefix for table names. Your WordPress database table may have a different table prefix.

    Click at wp-options

    Inside the wp_options table, you’ll need to find the row where option_name is set toactive_plugins.

    After that, click on the Edit link next to it.

    Click the Activate_Plugins option

    This will open up a box where you can manually enter details to activate a plugin.

    Step 3. Activate a Plugin Using phpMyAdmin

    WordPress stores the active plugins information in a special format so that it can be programatically accessed by the software.

    In order to tell WordPress which plugins to activate, we’ll need to use that same format.

    First, we’ll start by entering the option_value as a:1: and then open up the curly bracket ({).

    We are entering this value as 1 because we only want to activate one plugin. You have to change the value to the number of plugins you plan on activating.

    Add option value

    Next, we will be entering i:0; after the curly bracket. Here we are essentially assigning a serial number to our plugin.

    Remember to always assign numbers starting from 0 instead of 1.

    Add serial number

    Next, we will be entering the number of characters present in the plugin’s name and the php file name of the plugin that we’re about to activate.

    For that, we will type s:24: in the box. Keep in mind that the number of characters will differ for each plugin based on the characters in the plugin directory and file name.

    For instance, we are activating WPForms in this tutorial which has 24 characters in its name including the file name of the plugin as stored in our file manager.

    Add character number

    Next, you just need to type the plugin’s directory name. You can find it by visiting the /wp-content/plugins/ folder using the File Manager app.

    Don’t forget to add quotation marks before typing the plugin’s directory name.

    Type the plugins' name

    After the /, you need to enter the plugin’s file name. This is usually the file with similar name inside the plugin folder.

    Plugin file and folder name

    Now, go back to phpMyAdmin and type the name of the plugin and then close the quotation marks.

    After that, simply add a semi-colon (;) and close the curly brackets (}). The final value in this example would look like this:

    a:1:{i:0;s:24:"wpforms-lite/wpforms.php";}
    

    This is how it will look once you’re done.

    Activating a single plugin

    Next, simply click the ‘Go’ button to execute the command.

    Now go visit your WordPress dashboard and head over to Plugins » Installed Plugins.

    Your plugin has been successfully activated.

    activated-plugin

    Now let’s say you want to activate two more plugins.

    First you will need to change the number of plugins. After you will adjust each entry for the plugin that you want to activate.

    Here is an example:

    a:3:{
    i:0;s:47:"all-in-one-seo-pack-pro/all_in_one_seo_pack.php";
    i:1;s:35:"insert-headers-and-footers/ihaf.php";
    i:2;s:24:"wpforms-lite/wpforms.php";
    }
    

    Note: We have added line breaks here to make the code look more readable. You need to make sure that there are no line breaks or spaces in your code. Otherwise, it wouldn’t work.

    We hope you learned how to activate a plugin using the database. You may also want to see our guide on how to add social media feeds to WordPress, and our comparison of the best domain registrars in the world.

    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 Enable / Activate WordPress Plugins from the Database first appeared on WPBeginner.

  • How to Fix the Facebook and Instagram oEmbed Issue in WordPress

    Do you want to learn how to fix the Facebook and Instagram oEmbed issue in WordPress?

    If you’ve previously added Facebook or Instagram content to WordPress using the default oEmbed or Embed block, then this feature no longer works. This can cause errors and missing content on your WordPress website.

    In this guide, we’ll show you how to fix the Facebook and Instagram embed issue, so visitors can enjoy social content on your WordPress website.

    How to fix the Facebook and Instagram oEmbed issue in WordPress

    What is the Facebook and Instagram oEmbed Issue in WordPress?

    In the past, you could easily embed Instagram and Facebook posts in WordPress using a protocol known as oEmbed.

    However, Facebook changed the way that oEmbed works so you can no longer easily embed videos, pictures, updates, and other content from Facebook or Instagram.

    Instead, you now need to register an app and use a client token to get data from the Facebook Graph API, before you can embed Facebook or Instagram content on your WordPress blog.

    This would take a lot of time and effort, especially if you want to show lots of different social posts across your website. With that in mind, the people behind WordPress decided to remove the Facebook and Instagram embed feature.

    If you previously added any Facebook content to your website using oEmbed, it’ll now look something like the following image.

    An example of an oEmbed error in WordPress

    If you embedded any Instagram posts using oEmbed, then you’ll get a similar error.

    This is a bad user experience, and some visitors may assume that your website is broken, no longer maintained, or that you’re not a trustworthy or reliable business.

    There are ways to fix the problem manually. For example, you might go through each page and post and delete the embedded content. However, this would take a lot of time and effort, and there’s no guarantee you’ll manage to find every broken embed.

    With that being said, let’s see how you can easily fix the Facebook and Instagram oEmbed issue on WordPress.

    How to Fix the Facebook & Instagram oEmbed Issue

    The easiest way to fix the oEmbed issue is by using one of the free Smash Balloon plugins.

    If you want to embed Instagram posts in WordPress, then you’ll need the Smash Balloon Social Photo Feed plugin.

    An instagram post, embedded in a WordPress website

    Want to embed a Facebook post in WordPress? Then you can use the free Smash Balloon Social Post Feed plugin instead.

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

    After installing either plugin, simply head over to Instagram Feed » oEmbeds or Facebook Feed » oEmbeds, depending on the plugin you’re using.

    We’re using the Social Photo Feed plugin in all our images, but the steps will be exactly the same no matter what plugin you’re using.

    Enabling the oEmbed feature for Instagram and Facebook

    On this screen, simply click on the ‘Enable’ button.

    That’s it. You can now embed Facebook and Instagram posts on your WordPress website.

    How to Embed Instagram or Facebook Posts in WordPress

    Whether you’re using Facebook or Instagram, you can embed a specific post in any page, post, or widget-ready area, such as the sidebar.

    One option is to open the page or post where you want to show the social content. Then, click on the ‘+’ icon and type in ‘Embed.’

    When the right block appears, click to add it to the page or post.

    Adding the Embed block to a WordPress page or post

    In the ‘Embed’ field, simply paste the URL of the Instagram or Facebook post that you want to show on your website.

    Then, click on ‘Embed.’

    Embedding an Instagram post in WordPress

    WordPress will now show that specific post. When you’re ready to make the post live, simply click on ‘Update’ or ‘Publish.’

    Now when you visit the page, you’ll see the social media post live.

    An example of an Instagram post in WordPress

    Another option is adding the Instagram or Facebook post to a widget-ready area such as the sidebar. That way, you can promote the same post across every page of your website.

    For example, you might embed your most popular Instagram post or a post promoting a sale or social media contest you’re using to grow your site.

    Adding an Instagram post to a widget-ready area such as the WordPress sidebar

    To add a Facebook or Instagram post to a widget-ready area, simply go to Appearance » Widgets and click on the blue ‘+’ button.

    In the search bar, type in ‘Embed’ to find the right block.

    Embedding an Embed block in WordPress

    When the ‘Embed’ block appears, drag it onto the area where you want to show the Facebook or Instagram post.

    In the ‘Embed’ field, simply paste the URL of the Instagram or Facebook post that you want to show on your website. Then, click on ‘Embed.’

    Embedding Instagram photo in Instagram

    WordPress will now show that specific post.

    If you’re happy with how it looks, then click on ‘Update’ to make it live.

    Embedding Instagram post in WordPress

    Now, when you visit your website, you’ll see the Instagram or Facebook post live.

    How to Add an Instagram or Facebook Feed to WordPress

    With the free Smash Balloon plugins, it’s easy to fix the oEmbed issue so you can add Facebook and Instagram posts to your website.

    This is great if you only want to embed a small number of posts or you want to control exactly where each social post appears on WordPress. However, you may also want to embed a Facebook or Instagram feed on your website.

    By creating a feed, you can show all your latest posts in a nice layout. Even better, the feed will update automatically so visitors will always see the newest posts without you having to update your site manually.

    This can keep your site fresh and interesting, even for regular visitors.

    If you want to embed Instagram content in WordPress, then you can use the Smash Balloon Instagram Feed plugin.

    An Instagram feed, created using Smash Balloon

    Want to create a feed showing your latest Facebook status posts, videos, reviews, and more?

    Then you can use the Smash Balloon Facebook Feed plugin.

    Facebook reviews, embedded using Smash Balloon

    Want to add both Facebook and Instagram feeds to your WordPress website? Then you may want to look at Smash Balloon Social Wall.

    This powerful plugin lets you combine any feeds you’ve created using the Smash Balloon plugins, including Facebook, Twitter, YouTube feeds, and more.

    Creating a social media wall using Facebook and Instagram

    For example, if you’ve set up the Facebook Feed and Instagram Feed plugins, then you can simply go to Social Feeds » Create a Social Wall in your WordPress dashboard.

    Here, you’ll see all the different feeds you’ve created so far.

    How to create a social media wall using multiple feeds

    Simply select each feed that you want to add to the social wall.

    For example, you can combine posts from your Instagram and Facebook accounts.

    Combining Facebook and Instagram into a social wall

    Small Balloon Social Wall will then create a shortcode that allows you to add the social wall to any page, post, or widget-ready area.

    For more information about working with shortcodes, please see our guide on how to add a shortcode in WordPress.

    Social media shortcode, created using the Smash Balloon plugin

    After placing the shortcode, simply save or publish your changes to make them live.

    Now, if you visit your website, you’ll see a social wall featuring all the latest posts from your different accounts and platforms.

    We hope this article helped you learn how to fix the Facebook and Instagram oEmbed issue in WordPress. You may also want to see our expert pick of the best social media plugins for WordPress, and our guide on how to create an email newsletter.

    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 Fix the Facebook and Instagram oEmbed Issue in WordPress first appeared on WPBeginner.

  • How to Start WooCommerce Multi-Vendor Store Using Dokan

    Multi-vendor online stores also known as multi-vendor marketplaces are becoming popular nowadays. The idea behind a multi-vendor store is to allow individuals, resellers and/or companies to create their profiles and sell products.

    The post “How to Start WooCommerce Multi-Vendor Store Using Dokan” first appeared on WP Mayor.

  • How to Properly Disable Lazy Load in WordPress (Step by Step)

    Do you want to disable lazy loading in WordPress?

    By default, WordPress comes with a lazy load feature, which delays downloads for images and other media to improve page load speed.

    However, for some websites, it may affect user experience by not displaying images and media right away.

    In this article, we’ll show you how to easily disable lazy load in WordPress both using a code method as well as a plugin method.

    How to properly disable lazy load in WordPress

    What is Lazy Loading?

    WordPress first introduced lazy loading images in WordPress 5.5. Later it extended the lazy load feature to iframes embeds (e.g. YouTube videos, Spotify, and other embeds).

    This practice helps improve your website’s speed and performance by quickly loading content and the visible area first.

    A faster website is not just good for users, but it is also good for SEO. Search engines like Google consider speed as an important ranking factor.

    Apart from images and embeds, you can also easily lazy load comments and Gravatars to further improve page load speed.

    Lazy loading can be seen in action by right-clicking on an image and selecting the Inspect tool in your browser.

    Lazy loading images in WordPress

    This will split your browser screen and show you the HTML source code. From here, you’ll be able to see the “loading=lazy” attribute added to the image.

    Now normally, we don’t recommend disabling lazy load due to its overall benefits for your WordPress website. Turning it off can result in slower website speed, lower conversion rates, and lower SEO rankings.

    However, sometimes lazy loading can affect the user experience for some websites.

    For instance, if you run a photography website where images are the most significant aspect of your content, then lazy loading them may ruin the user experience for your customers.

    In other cases, you might be using a different lazy loading solution and just want to turn off the default WordPress lazy load.

    That being said, let’s see how you can easily disable lazy load in WordPress.

    You can simply disable the lazy load feature in WordPress by adding a custom code snippet to your theme’s functions.php file.

    However, keep in mind that the smallest error while adding the code can result in breaking your website and making it inaccessible to your users.

    This is why we recommend using the WPCode plugin to add custom code to your site.

    It is the best custom code snippets plugin that makes it super easy for beginners to safely add custom code to their website.

    First, you need to install and activate the WPCode plugin. See our guide on how to install a WordPress plugin for more instructions.

    Upon activation, go to the Code Snippets » + Add Snippet page.

    Add new snippet

    This will take you to the ‘Add Snippets’ screen where you’ll see a bunch of ready-to-use code snippets that you can add to your website.

    From here, you need to click the ‘Use Snippet’ button under the ‘Add Your Custom Code (New Snippet)’ option.

    Once you’re on the ‘Create Custom Snippet’ page, you can start by typing a name for your code snippet.

    It can be anything that will help you identify the code snippet and what it does.

    Snippet title and type

    After that, select ‘PHP Snippet’ from the dropdown menu next to the ‘Code Type’ option.

    Now, copy and paste the following PHP code in the ‘Code Preview’ box.

    add_filter( 'wp_lazy_loading_enabled', '__return_false' );
    

    This is how the code will look after it is pasted in the ‘Code Preview’ box.

    Add code snippet

    After adding the code, scroll down to the ‘Insertion’ section.

    Here, simply choose ‘Auto Insert’ as the insertion mode. This will ensure that your custom code is automatically executed everywhere on your website once you activate the snippet.

    Choose an insertion method

    Next, you need to scroll to the top of the page and simply toggle the ‘Inactive’ switch to ‘Active’.

    After that, don’t forget to click the ‘Save Snippet’ button to save and execute your custom snippet.

    Save your code snippet

    Once activated, this custom code snippet will disable the lazy loading feature on your WordPress website.

    You can test by right-clicking on an image and selecting Inspect from the browser menu.

    In the HTML code for the image, the loading=lazy attribute will now disappear.

    Lazy loading disabled

    Method 2. Disable Lazy Load in WordPress Using a Plugin

    If you don’t want to add code to your site, then you can use the Disable Lazy Load plugin.

    The only thing you need to do is install and activate the Disable Lazy Load plugin. For more instructions, check our guide on how to install a WordPress plugin.

    Activate plugin to disable lazy load

    The plugin works out of the box and does not require any configuration. Once activated, it will automatically disable the lazy load feature on your site.

    We hope this article helped you learn how to properly disable lazy load in WordPress. You may also want to see our guide on how to optimize WordPress images for better page load times, or see our pick of the best WordPress image compression plugins.

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

    The post How to Properly Disable Lazy Load in WordPress (Step by Step) first appeared on WPBeginner.