Performance & Security Archives - Website Guides, Tips & Knowledge DreamHost Thu, 06 Jun 2024 20:13:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.4 Everything You Need To Know About Speeding Up WordPress https://www.dreamhost.com/blog/wordpress-site-speed/ Mon, 13 Nov 2023 15:00:09 +0000 https://dhblog.dream.press/blog/?p=42380 Site speed plays a crucial role in your website’s success. It affects a variety of key metrics, from visibility to conversion rate. Optimizing your website’s speed is clearly a necessity, but figuring out how to do it can be tricky. Fortunately, there are several easily-accessible speed tests you can use to determine how your site’s […]

The post Everything You Need To Know About Speeding Up WordPress appeared first on Website Guides, Tips & Knowledge.

]]>
Site speed plays a crucial role in your website’s success. It affects a variety of key metrics, from visibility to conversion rate. Optimizing your website’s speed is clearly a necessity, but figuring out how to do it can be tricky.

Fortunately, there are several easily-accessible speed tests you can use to determine how your site’s performance measures up. And although there are many reasons your site may be slow, you can resolve many of them with free WordPress plugins and quality web hosting.

In this post, we’ll explore why site speed is so vital, and then dig into solutions that can help you optimize your website performance for speed. Let’s dive right in!

Why Your Website’s Loading Speed Matters

Things have changed a lot since the beginning of the internet. Today’s users expect significantly faster page load times, and your site needs to live up to their expectations. In fact, making sure your site is fast and performs well is the first of Google’s four Web Fundamentals, and it’s easy to see why.

DreamHost Glossary

Page Load Time

Page load time is, quite simply, the amount of time it takes for a webpage to load. In more technical terms, it is the time taken to download and display the entire content of a web page. It is usually measured in seconds.

Read More

The biggest issue with having a slow website is that your users will often lose patience and leave if your site takes too long to load. This negatively affects your bounce rate– the number of visitors who click away after only seeing one page.

Nearly half of users expect sites to load in two seconds or less, and 40% will leave a site if it hasn’t loaded within three seconds.

Graphic representing two statistics. Nearly half of users expect sites to load in two seconds or less, and 40% will leave a site if it hasn’t loaded within three seconds.

In other words, when pages take longer than expected to load, it negatively impacts your site’s User Experience (UX). This matters because any time your UX takes a hit, so does your conversion rate.

Even fractions of a second count, so optimizing your site’s performance as fully as you can is crucial. What’s more, website speed not only influences whether users stay on your site and convert; it also affects whether or not they can find it in the first place.

Site speed is now a Google ranking factor for both desktop and mobile sites, meaning it impacts your site’s search engine optimization (SEO). If you don’t maintain decent website performance, your site’s visibility on search engine results pages (SERPs) may decrease, leading to less traffic.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

How To Test Your Site’s Current Speed

Before we dive into some of the causes behind slow loading speeds, let’s look at how to examine your own site and see how well it’s currently performing. The best way to find out if your site is suffering from slowdowns is to test it thoroughly and regularly. Fortunately, there are free tools you can use to quickly gather this information.

We’re going to introduce a few free tools you can use to test your site’s speed. We recommend that you repeat these tests multiple times to ensure caching issues or high traffic don’t mess with your results. It’s also smart to run these tests regularly. New factors can affect your site and slow it down unexpectedly, so you’ll always need to keep up-to-date with its performance.

Google PageSpeed Insights

Screenshot from Google PageSpeed Insights

Google PageSpeed Insights is a free tool from Google that tests, measures, and reports on your website’s performance. It also runs diagnostics and recommends action items to help you improve your site’s performance.

PageSpeed Insights provides a ton of information, and it can admittedly be tricky for beginners to use. That’s why we have a full tutorial on getting the most out of this powerful tool.

Pingdom Tools

Screenshot of Pingdom Tools

The next option we’ll be looking at is Pingdom Tools. This site accesses your pages from a specific location and returns information about how quickly they loaded.

This process enables you to test your site’s loading speed. Plus, Pingdom Tools rates your site based on several metrics. For instance, it shows how many requests were required, how many redirects were performed, and how your site’s speed compares to others.

To perform a test, simply enter your site’s URL into the field on the main page, select the location you want to use, and click on Start Test. Depending on how many people are currently using the site, you may be placed in a queue, but in our experience, it usually takes less than a minute for the test to begin. When the test is complete, the page will show the results at the bottom.

Since the results will differ slightly each time, you’ll want to do this a few times to get an average figure. This will give you a more comprehensive overview of how well your site performs and provide some insight into what areas of your site need improvement.

GTmetrix

Screenshot of the GTmetrix homepage

This is another free speed-checking tool that can be incredibly useful. GTmetrix works much the same way as the previous tools, but it also provides more advanced metrics and even offers optimization suggestions based on your results.

You can start a test by entering your site’s URL on the home page and clicking “Test your site.” When the test has concluded, you’ll get access to a lot of data. You’ll see how quickly your website loads, as well as other data including the overall size, uptime reports, web vitals, and more.

DreamHost Glossary

Core Web Vitals (CWV)

Core Web Vitals (CWV) was developed by Google and represents a trio of user experience metrics designed to help create a faster, more accessible, and higher quality web browsing experience. The three Core Web Vitals metrics include Largest Contentful Paint (LCP), First Input Delay (FID), and Cumulative Layout Shift (CLS).

Read More

Scroll down the page and you’ll find tabs with even more detailed test results, such as resource usage. However, outside of the basic data, you’ll need to register for an account in order to access all of this information.

Remember to run this test a few times as well to get a reliable average result. Once you’ve done that, you’ll have a solid idea of how well your site is currently performing. You can then interpret the results to find areas where your site could be improved. Armed with that information, it’s finally time to see how you can make your site faster.

14 Problems Impacting WordPress Site Speed

Once you know the current state of your site’s performance, you can start optimizing key factors that influence site speed. Let’s look at some of the most common reasons your WordPress site might be slowed down and the best ways you can speed up WordPress — whether you’re a beginner or a seasoned site administrator.

1. Render-Blocking JavaScript Is Delaying Page Loads

JavaScript is the code that makes your website functional and interactive for users. Without it, your site would be pretty dull. However, if left unoptimized, JavaScript can delay your pages when they try to load in users’ browsers.

When a browser tries to display a webpage, it has to stop and fully load any JavaScript files it encounters first. This results in what’s called “render-blocking JavaScript” or JavaScript that prevents the page from loading quickly.

There are three solutions for dealing with render-blocking JavaScript:

  • Remove external JavaScript files, and use inline JavaScript instead.
  • Use asynchronous loading so JavaScript can load separately from the rest of the page.
  • Defer JavaScript loading until the rest of the page is visible to the user.

Each method has its pros and cons. Generally speaking, inline JavaScript will only improve page speed when used sparingly. Asynchronous loading can cause issues as files are not loaded in any particular order. Therefore, deferring JavaScript is usually the recommended method.

2. You’re Not Using A Content Delivery Network (CDN)

A Content Delivery Network (CDN) consists of several servers that are placed in strategic geographic locations. You can store copies of your website on them so its pages can be quickly loaded by users who are located far away from your main server.

DreamHost Glossary

CDN

CDN is an abbreviation for ‘Content Delivery Network’. It refers to a geographically-distributed network of web servers (and their data centers). The entities that make up a CDN collaborate to ensure speedy content delivery via the internet.

Read More

There are several CDN options for your WordPress site. Cloudflare is one of the most popular solutions, as is the Jetpack CDN for images and videos. Customers on our DreamPress Plus and Pro plans get unlimited CDN usage powered by Jetpack.

Additionally, your website’s JavaScript or jQuery can also be accessed from a CDN instead of your main web server.

3. There’s Excessive Overhead In Your Database

“Overhead” refers to extraneous items in your site’s database. Things like logs, transients, and other entries from plugins or themes that can build up over time. Too much of this “overhead” can cause database queries to take longer than necessary. In some cases, too much overhead can even cause your web server to time out while waiting for a response from your database.

Optimizing your database by removing overhead will help prevent this. You can install and use a plugin, like WP-Optimize – Cache, Clean, Compress. You could also check with your web host, as most will allow you to access the database management platform phpMyAdmin via your hosting account. If you aren’t able to optimize your tables in phpMyAdmin, you can use the WordPress Command Line Interface (WP-CLI).

DreamHost Glossary

phpMyAdmin

phpMyAdmin is a free piece of software used to handle the administration of MySQL and MariaDB. It is accessed over the web and provides a more user-friendly way of working with SQL.

Read More

4. Your Site’s CSS Isn’t Optimized

Like JavaScript, your site’s CSS–the code responsible for styling its pages–can delay loading if left unoptimized. There are a few solutions you can implement to get your CSS into shape:

  • If you have several external CSS files, combine them into one or a few files.
  • Remove external CSS and use inline CSS instead.
  • Use “media types” to specify when certain CSS files should be loaded.

Like inline JavaScript, inline CSS is only useful for small portions of code. If you have several large CSS files, you shouldn’t try to add all of them to your HTML file. Specifying media types and combining your external CSS files (if you have more than one) should make a more significant impact.

One of the reasons Block themes usually load faster than classic WordPress themes is that their styles load only when their specific blocks render on a page. Consider the use of a block theme.

5. OPcache Isn’t Enabled

OPcache is a built-in caching engine for the coding language PHP. If you use PHP on your site (and all WordPress sites are built on PHP), having OPcache enabled can speed up the loading of your pages.

If you host your website with one of our Shared WordPress or DreamPress plans, OPcache is enabled by default. If your site is hosted using one of our other plans or with another web host, it likely has that functionality, but you’ll need to enable it manually.

6. Caching Issues Are Preventing Optimized Page Loading

Caching is when servers store static copies of your website’s files. Then, when users access your site, their browsers can display the cached data instead of having to reload it.

There are several caching solutions available for WordPress users, like using a caching plugin such as WP Super Cache.

DreamPress customers have the advantage of built-in caching, which is included with your hosting account. This makes third-party caching plugins unnecessary. However, we do recommend using the Nginx Helper plugin to manage your DreamPress cache. The plugin automatically sends requests to delete cached data for a page or post after you’ve modified it. This can help prevent some caching issues that may result in slower site speeds.

screenshot of the NGINXhelper plugin download page on wordpress

7. Large Media Files Increasing Loading Times

Media files, such as images and videos, tend to be quite large–but you don’t necessarily need to resize them all. Optimizing them through compression can help to decrease file sizes and therefore, improve your loading times.

TinyJPG is a free online tool that compresses images. However, to make things even easier, you can install an image compression plugin. This will automatically decrease the size of any images you upload, including their thumbnails. You can even set the level of compression you want.

There are several image optimization plugins you can use to compress media files within WordPress, including Smush Image Compression and Optimization. Another free plugin that we have recommended in the past and still love is ShortPixel.

There is also a switch to enable basic image compression from the DreamHost panel.

screenshot showing the "image optimization" option in DreamHost you can use to toggle on/off this function

Compressing videos is a little trickier, so it’s usually better to host them externally on YouTube or another platform instead. You can then easily embed your videos on pages or posts.

One last tip: Make sure all your images are in WebP format rather than jpeg or png. Webp image files are optimized for the web, so they help your site load as quickly as possible.

8. Poorly-Written Scripts Are Conflicting With Other Site Elements

Poorly-written JavaScript can sometimes cause compatibility issues with other parts of your website, resulting in longer loading times. Running a speed test using the tools we explored earlier in this article can help–especially one like GTmetrix, which can point you toward the exact scripts that are taking a long time to load and give recommendations for fixing the problem.

DreamHost Glossary

JavaScript

JavaScript is a flexible programming language that makes websites more engaging and interactive. It teams up with HTML and CSS to improve how users experience websites and apps.

Read More

9. Your Site’s Code Is Too Bulky

The more code your user’s web browser has to load, the longer it will take for your website to become visible. If your code is too “bulky” or contains unnecessary characters and line breaks, your site may be slower. In response, you can “minify” your code by removing any elements that aren’t needed. This might sound complex if you’re not a coder, but we’ll try to explain why this works.

In a nutshell, most code is written not just to be functional but also to be easily readable by humans. This results in excess information that isn’t strictly necessary. By minifying the code, you can keep the functionality intact but make it much faster for computers to read and run.

There are two popular plugins for code minification. Autoptimize minifies code in addition to inlining CSS and optimizing JavaScript files. It also integrates well with WP Super Cache.

Fast Velocity Minify merges CSS and JavaScript files to reduce the number of requests needed for browsers to load your pages. It also minifies your code.

Both plugins are solid choices. You might consider trying out each one and seeing which increases your performance test scores more.

10. Plugins And Themes Are Weighing Your Site Down

Having too many plugins, or even a few very bulky ones, can weigh your website down and cause poor performance. It’s wise to always completely remove any plugins you’re not using to minimize the chance that this will happen.

Additionally, some plugins can interfere with the caching of your site’s pages and slow down the load times. If you’re using the Proxy Cache Purge plugin we mentioned earlier in this article, you can pinpoint which plugins are causing the problem by navigating to Proxy Cache > Check Caching.

Another possible culprit is your WordPress theme. When you choose a theme for your site, you’re most likely focusing on its appearance and features. However, this could result in picking a low-performance theme that drags down your site. As such, you should always check a theme’s user reviews first to see if other people have encountered speed issues.

You can also test to see if your theme slows down your site. This can be done by temporarily replacing it with a default theme. Just access Appearance > Themes, and click on Activate next to one of the basic WordPress options. Now, test your site’s speed again to see if you notice a significant difference. If so, you may want to look for a more optimized theme, like the new WordPress block themes.

Screenshot showing how to access or change your WordPress theme from the WP Admin page.

11. Internet Issues Are Hurting Specific Users’ Performance

Poor website performance can be due to an issue with a user’s Internet Service Provider (ISP), rather than with your site itself. Slow site speeds can result from network congestion, bandwidth throttling and restrictions, data discrimination and filtering, or content filtering.

If you notice slow speeds when visiting your site, you can run a traceroute between your computer and your website to test the connection. This should give you an idea of whether the problem is related to your ISP or is a more significant site-wide concern.

12. Gzip Compression Isn’t Enabled

As your site expands, many of its files grow in size as well. The downside of larger files is that they often take more time to load when your pages are accessed. To deal with this problem, you need to find a way to make your site’s files smaller without losing any important information.

This is exactly what Gzip compression does. It reduces the size of your files by ‘compressing’ them, removing unnecessary characters, and reorganizing data more efficiently.

Gzip compression is one popular tweak you can make to speed up your site. While the term may sound technical, the basic concept isn’t too complicated. What’s more, enabling Gzip compression on your WordPress site is surprisingly easy. There are two main methods to do so:

Method 1: Use a plugin

Many speed optimization plugins include an option for Gzip compression as a part of their feature sets. WP Super Cache is one example.

Method 2: Modify your .htaccess file

This method is slightly more complex. You’ll need to use the Secure File Transfer Protocol (SFTP), which lets you directly access (and make changes to) your site’s files. If you’ve never used SFTP before, you’ll first want to install a suitable client, such as FileZilla (and brush up on your SFTP skills). Then you’ll need to establish a connection to your site using your hosting credentials.

Screenshot showing how to access your WordPress files using SFTP or FTP.

Once you have FileZilla set up, in the top right quadrant, find the folder named after your website’s domain and select it. Then, in the bottom right quadrant, look for the file called .htaccess. This is one of your site’s core files, so you should always be very careful when making changes to it.

Screenshot showing the location of the htaccess file, located inside your website's root directory

Right-click the .htaccess file and select Download to save it to your computer. Then open the file in any text editor (such as Notepad), and paste in the following code:

<IfModule mod_deflate.c>

# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml

# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

</IfModule>

Don’t forget to save your changes to the file. After that, you can re-upload it to your site by copying and pasting it back into your website’s root folder (or simply dragging it there from your computer). Now you’ve enabled Gzip compression on your WordPress website manually!

Note that this method is for websites with Apache servers. If your site runs on NGINX, we recommend checking out this tutorial on enabling Gzip compression with NGINX.

13. Your Plugins, Themes, Or WordPress Software Are Out Of Date

These days, most people are constantly inundated with update notices from all their devices and software. We understand that it’s easy to become numb to these messages, especially when the effects of required updates are so often invisible to the average user. However, when it comes to WordPress, you should always make sure to update every aspect of your site as soon as possible.

It’s essential not to ignore updates when they become available, whether they’re core updates for your WordPress installation or new versions of your WordPress theme or plugins. The most important reason for this is security–new updates will ensure that your site is safe against the latest threats.

However, keeping your site up to date will also ensure that it remains as fast as possible. WordPress developers are always improving the core software to be faster and better optimized. By updating, you’re ensuring that every aspect of WordPress is running at peak performance.

You should also make sure your site uses the latest version of PHP. This will speed up your site considerably and also ensure full compatibility with WordPress. If you have a managed hosting plan with DreamHost, you have access to PHP’s most recent version. Plus, your site will be automatically updated whenever a new version of WordPress is ready.

14. Your Media Library And Post Revisions Need Cleaning Up

It’s not just plugins and themes that can build up over time and clog up your site. As your site grows, your media library will fill up with images, documents, and other files. It’s not unusual for long-running sites to contain hundreds if not thousands of image files, for example.

Even if you use image optimization, this many files can start to strain your server resources. Identifying and deleting unused media files can be an incredible pain if done manually. Fortunately, there are plugins that can help you out, like the Media Cleaner plugin.

Screenshot of the "Media Cleaner" plugin from the WordPress plugin directory.

This plugin will automatically find and delete any unused media files in your library. It will search for files that don’t appear on any pages or posts and place them in a trash bin. This enables you to sort through them and save files you want to keep, even if they’re not used on the site.

Another potential resource-waster is post revisions. These enable you to see earlier versions of posts, which can be helpful while you’re creating content. However, since these are essentially copies of your existing posts, they can also take up a considerable amount of unnecessary space.

You should, therefore, make sure to regularly clean up your revision archive. One plugin enabling you to do this is WP-Optimize, which also cleans up your comments table.

Get Your Site Up To Speed With Managed WordPress Hosting

Now you know how important it is to keep your website in tip-top shape, whether you run a consulting business or an e-commerce store.

In this guide, we’ve looked at some of the best ways you can improve WordPress performance, but there’s one aspect of site speed optimization we haven’t mentioned yet: choosing a great hosting provider.

DreamPress provides faster SSD-based storage and other built-in speed optimization solutions, such as caching plugins. Using managed hosting also makes it much easier to expand and scale your site over time.

What’s more, DreamPress includes many additional features that are beneficial to your website, such as a built-in firewall and a free SSL certificate. There’s a reason why it’s officially recommended by WordPress, after all. If you want more information about how we can help you speed up your site, feel free to contact us with any questions!

Ready to optimize your site? DreamHost makes WordPress easy! Leave migrating your site, managing security and updates, and optimizing server performance to us. Now you can focus on what matters most–growing your business. Check out plans today!

Ad background image

You Dream It, We Code It

Tap into 20+ years of coding expertise when you opt for our Web Development service. Just let us know what you want for your site — we take it from there.

Learn More

The post Everything You Need To Know About Speeding Up WordPress appeared first on Website Guides, Tips & Knowledge.

]]>
Everything You Need To Know About WordPress Security (+20 Hardening Tips) https://www.dreamhost.com/blog/secure-your-wordpress-website/ Thu, 20 Jul 2023 14:00:04 +0000 https://www.dreamhost.com/blog/?p=9181 If you’re looking for a top-tier, all-in-one content management system to power your website, look no further than WordPress. WordPress is an excellent, secure platform out of the box, but there’s certainly more you can (and should!) do to keep your site safe from malicious intent. Many of these security enhancements are easy to implement […]

The post Everything You Need To Know About WordPress Security (+20 Hardening Tips) appeared first on Website Guides, Tips & Knowledge.

]]>
If you’re looking for a top-tier, all-in-one content management system to power your website, look no further than WordPress.

WordPress is an excellent, secure platform out of the box, but there’s certainly more you can (and should!) do to keep your site safe from malicious intent. Many of these security enhancements are easy to implement and can be performed manually in mere minutes. Others simply require installing a particular plugin.

In this article, I’ll guide you through 20 different strategies for upping the defenses on your WordPress fortress. But first, let’s go a little further into why website security should matter to you.

Why WordPress Security Is So Important

Meet WordPress

Choosing WordPress as your platform is an excellent way to start when you’re trying to create a site. It’s not only a flexible, powerful platform for building websites — it’s also remarkably secure as is.

But of course, no platform can be 100% secure, and there are many reasons to be concerned about the security of your WordPress site:

  • Popularity – WordPress powers a huge portion of all the websites on the internet, making it a prime target for cybercriminals. Its widespread usage makes it an attractive platform to exploit vulnerabilities and gain unauthorized access to websites.
  • Vulnerabilities – As with any software, WordPress is not immune to vulnerabilities. Hackers constantly search for vulnerabilities in WordPress themes, plugins, and core software. Exploiting them can lead to unauthorized access, data breaches, defacement, or even complete control of a website.
  • Data breaches – WordPress websites often store sensitive user information, like email addresses, passwords, and personal data. A security breach can expose this confidential data, leading to identity theft, financial loss, or even legal consequences (yikes!).
  • SEO impact – A compromised WordPress site can be used for malicious activities, like hosting malware, redirecting visitors to harmful websites, or sending spam emails. Search engines may flag and penalize such websites, leading to a significant drop in rankings and organic traffic once you regain control of your site.
  • Reputation and trust – If a WordPress website is compromised and used for malicious purposes, it can severely damage the site owner’s reputation and erode user trust. Think of an e-commerce store, for example. If the store can’t commit to keeping shoppers’ personal data safe, people just won’t shop there (and who can blame them?).
  • Downtime and financial loss – A hacked site can experience extended downtime while the website owner works to resolve the security breach. In turn, downtime can result in lost business, decreased revenue, and additional expenses for recovery and restoration.

Given these risks, investing in WordPress security measures is essential to protect your website and its users’ data. Ideally, you should put just as much time and effort into security as you spent designing your site in the first place (if not more). Fortunately for you, dear reader, there are lots of simple, quick ways to improve your site’s security, as well as some more complex techniques you may want to employ — and below, we’re covering them all.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Top WordPress Security Vulnerabilities

As the saying goes, know thy enemy. Before we dive into our security tips, let’s learn more about the security vulnerabilities you need to protect your WordPress site from.

  • Outdated software, themes, and plugins – Using outdated versions of WordPress, themes, or plugins can leave your site vulnerable to known security flaws.
  • Weak usernames and passwords – Weak login credentials make it easier for hackers to access your site. Avoid using common usernames like “admin” and choose strong, unique passwords that include a combination of letters, numbers, and symbols.
  • Brute force attacks – Brute force attacks involve repeated attempts to guess your login credentials. You can prevent them by limiting login attempts and using two-factor authorization (more on that later in this article).
  • Cross-site scripting (XSS) – XSS vulnerabilities happen when malicious scripts are injected into web pages, potentially compromising users’ browsers or session data. Many security plugins have features to prevent XSS.
  • Malware infections – Malware can be injected into your site through vulnerabilities, infected themes or plugins, or compromised files. To avoid malware, don’t install plugins without checking into their reputation first. And regular malware scanning can catch infections before they have the chance to wreak havoc on your site.
  • Backdoors – A backdoor is a hidden entry point in a website that allows unauthorized access even after security measures are in place. Backdoors can be created by malicious actors or accidentally introduced through compromised themes, plugins, or weak security practices. Once a backdoor is established, it can grant unauthorized access to an attacker, who can then manipulate the site, steal data, or perform other malicious activities without the website owner’s knowledge.

Implementing security plugins and other best practices can protect your site from these vulnerabilities. So without further ado, let’s get to what you’re here for: actionable WordPress security tips and how to put them into practice.

20 WordPress Security Tips

Hopefully, I’ve convinced you about the importance of maintaining a secure WordPress website. If not, I’m going to have to re-enroll in Persuasive Writing 101. Please don’t make me do that.

Throughout the rest of this article, I’ll introduce 20 strategies (along with some of the best WordPress security plugins) for making your site safer from some of the most common and dangerous security vulnerabilities. You don’t have to implement every suggestion on this list (although you certainly can!), but the more steps you take to secure your site, the lower your chances of encountering a disaster down the road.

1. Use A Quality Host

You can think of your web host as your website’s street on the Internet — it’s the place where your site “lives.” And like a good school district matters to your kid’s future (so they say; I turned out fine), the quality of your website’s home base counts in a lot of big ways.

A solid hosting provider can impact how well your site performs, how reliable it is, how large it can grow, and even how it ranks in search engines. The best hosts offer a variety of useful features, excellent support, and a service tailored to your chosen platform.

As you’ve probably already guessed, your web host can also have a significant impact on your site’s security. There are several security benefits to choosing from the best hosting companies.

How Web Hosting Can Improve WordPress Security:

  • A quality host will constantly update its service, software, and tools to respond to the latest threats and eliminate potential security breaches.
  • Web hosts often offer various targeted security features, such as SSL/TLS certificates and DDoS protection. You should also get access to a Web Application Firewall (WAF), which will help monitor and block serious threats to your site.
  • Your web host will most likely provide a way to back up your site (in some cases, even carrying out real-time backups for you), so if you’re hacked, you can easily revert to a stable, previous version.
  • If your host offers reliable, 24/7 support, you’ll always have someone to help you out if you do run into a security-related issue.

This list should give you a good starting point to work from when looking for a host for your new site. You’ll want to find one that offers all of the features and functionality you’ll need, plus has a reputation for reliability and excellent performance.

DreamPress is a managed WordPress hosting service that’s fast, reliable, scalable, and, of course, secure. DreamPress includes a pre-installed SSL/TLS certificate and provides a dedicated WAF designed with rules built to protect WordPress sites and block hacking attempts. With your hosting plan, you’ll also get automated backups, 24/7 support from WordPress experts, and Jetpack Premium — a plugin that can add many additional security features to your site — at no additional cost.

DreamHost Glossary

Jetpack

Jetpack is a WordPress plugin created by Automattic, the company behind WordPress.com. It’s a plugin that gives you access to features that are usually only available on WordPress.com sites.

Read More

With DreamPress, you’ll be able to rest easy knowing that your site is protected. Our hosting service even takes care of many of the other security-enhancing steps on this list — although we still encourage you to read on to learn what extra measures you can take to protect your site.

2. Register Your Domain Privately

To register a domain, you’re asked to provide your name, address, and phone number. This information is used to track ownership of domain names and can be found online with a quick search on the WHOIS directory.

While keeping track of this information is vital to the health of the internet, it’s reasonable not to want your personal information online. This is where Private Registration enters the story. When you register a domain with DreamHost (or another secure hosting platform, I guess), you have the option to substitute your personal information with the relevant data from the hosting platform — so looking up your domain on WHOIS shows DreamHost’s address and contact information instead of yours. You can even enable this security feature after your domain has already been registered!

3. Change Your Admin Username

When you first create your website, all shiny and new, you’re given a User Profile. At any time, you can go back and change your Nickname or fill in your Full Name, but to change your username is a different story — you will need to create a whole new user and grant that account the administrator role. The drawback? You need to use a different email address than the one used by your current account.

You can then alter your username by creating a new user, giving it the administrator role, attributing all your content to it, and deleting your original account. When your previous username has been deleted, you can change the email address of your new account if you desire.

WordPress Login Screen

4. Enable A Web Application Firewall

You’re probably familiar with the concept of a firewall — a program that helps to block all sorts of unwanted attacks on your site. Most likely, you have some kind of firewall on your computer. A Web Application Firewall (WAF) is simply a firewall designed specifically for websites. It can protect servers, specific websites, or entire groups of sites.

A WAF on your WordPress site will function as a barrier between your website and the rest of the web. A firewall monitors incoming activity, detects attacks, malware, and other unwanted events, and blocks anything it considers a risk from accessing your web server. #winning

You have many options for adding a WAF to your site (WordFence is a popular choice). But if you’ve opted for our DreamPress package, you can relax; you won’t need an additional firewall. DreamPress includes a built-in WAF that will monitor your site for threats and block malicious users and programs from gaining access. No action required on your part.

DreamHost also offers DreamShield, our in-house malware scanning service. When you enable DreamShield on your hosting account, we’ll scan your site daily for malicious code. If we find anything suspicious, you’ll be notified immediately via email.

5. Implement Two-Factor Authentication

Two-factor authentication (which also goes by two-step authentication and a variety of other, similar names) refers to a two-step process you’ll need to follow when logging into your site. This takes a little more time and effort but goes a long way toward keeping hackers out.

Two-factor authentication involves using a smartphone or other device to verify your login. First, you’ll visit your WordPress site and enter your username and password as usual. A unique code will then be sent to your mobile device, which you must provide to finish logging in. This enables you to prove your identity by showing you have access to something solely yours — such as a particular phone or tablet.

As with many WordPress features, two-factor authentication is easy to add with a dedicated plugin. The Two Factor Authentication plugin is a solid choice — it’s created by reliable developers, compatible with Google Authenticator, and will enable you to add two-factor functionality to your site with no fuss.

Another choice is the Two-Factor plugin, which was built mainly by core WordPress developers and is well known for its reliability. As with any plugin in this category, it comes with a bit of a learning curve, but it will get the job done and is incredibly secure. If you’re willing to spend a little money, you can also check out Jetpack’s Clef-like premium solution.

Whatever route you choose, make sure to plan ahead with your team, since you’ll need to gather phone numbers and other information for all user accounts. With that, your login page is now secured and ready to go.

6. Be Mindful When Adding New Plugins And Themes

One of the best things about WordPress is the ready availability of plugins and themes for just about any need. With these handy tools, you can make your site look just right and add nearly any feature or functionality you can think of.

Not all plugins and themes are created equally, though.

Developers who aren’t careful or don’t have the right level of experience can create plugins that are unreliable or insecure — or just downright sucky. They might use poor coding practices that leave holes hackers can easily exploit or unknowingly interfere with crucial functionality.

This means you must be very careful about the themes and plugins you add to your site. Each one should be vetted to ensure it’s a solid option that won’t hurt your site or cause problems. Here’s how to select quality tools:

  • Read reviews Check user ratings and reviews to learn whether others have had a good experience with the plugin or theme.
  • Developer support Look at how recently the plugin or theme has been updated. If it’s been longer than six months, chances are it isn’t as secure as it could be.
  • Easy does it Install new plugins and themes one at a time, so if anything goes wrong, you’ll know what the cause was. Also, remember to back up your site before adding anything to it.
  • Vetted sources Get your plugins and themes from trustworthy sources, such as the WordPress.org Theme and Plugin Directories, ThemeForest and CodeCanyon, and reliable developer websites.

7. Regularly Update WordPress

Keeping WordPress up to date is one of the most important things you can do to secure your site. Smaller patches and security updates will be implemented automatically, but you may need to approve major updates independently (don’t worry, this is very simple to do). This probably goes without saying, but DreamHost handles these updates for you, so you don’t have to worry.

But your work isn’t done just because WordPress is up to date.

You’ll also need to regularly update your plugins, themes, and other WordPress installations to ensure they work well together and are secured against the latest threats. Fortunately, this is also pretty easy — simply go to your WordPress dashboard, look for the red notifications telling you there are themes or plugins with available updates, and click “Update Now” next to each one.

Keep WordPress secure by updating plugins

You can also update your plugins in a batch by selecting all of them and then hitting the update button, either here or in the WordPress panel.

8. Configure File Permissions

Let’s talk technical for a minute.

A lot of the information, data, and content on your WordPress site is stored in a series of folders and files on its back end. These are organized into a hierarchical structure, and each one is given a permissions level. The permissions on a WordPress file or folder determine who can view and edit it. They can be set to allow access to anyone, only you, or almost anything in between.

File permissions are represented by a three-digit number in WordPress, and each digit has a meaning. The first digit stands for an individual user (the site’s owner), the second digit for the group (for example, members of your site), and the third for everyone in the world. The number itself means that the user, group, or world:

  • 0: Has no access to the file.
  • 1: Can only execute the file.
  • 2: Can edit the file.
  • 3: Can edit and execute the file.
  • 4: Can read the file.
  • 5: Can read and execute the file.
  • 6: Can read and edit the file.
  • 7: Can read, edit, and execute the file.

So, for example, if a file is given a permissions level of 640 it means the primary user can read and edit the file, the group can read the file but not edit it, and the rest of the world cannot access it at all. It’s important to ensure that each person only has the level of access to your site’s files and folders you want them to have.

WordPress recommends setting folders to a permissions level of 755 and files to 644. You’re pretty safe sticking to these guidelines, although you can set up any combination you’d like. Just remember that it’s best not to give anyone more access than they absolutely need, especially to core files.

You should also keep in mind that your ideal permissions settings will depend somewhat on your hosting service, so you may want to find out what your host recommends.

Note: Be very careful when making changes to your permissions levels — choosing the wrong values (like the dreaded 777) can make your site inaccessible.

And while we’re on this subject, it’s important to note that WordPress comes with a built-in code editor that allows users to edit theme and plugin files right from the Admin Area. This is handy when you need it, but a big security risk if your site falls into the wrong hands. That’s why you should disable file editing with a plugin like Sucuri.

9. Keep WordPress Users To A Minimum

If you’re running your WordPress site solo, you don’t need to worry about this step. Just don’t give anyone else an account on your site, and you’ll be the only person who can make changes.

However, there are many reasons to add another user account to your site: You may want to let other authors contribute content, or you might need people to help edit content and manage your site. You may even have an entire team of users who regularly access your WordPress site and make their own changes.

This can be beneficial (or even necessary). However, it’s also a potential security risk.

The more people you let into your site, the higher the chance that someone will make a mistake, cause problems, or just be a putz. That’s why you should keep your site’s user count as low as possible without hampering its ability to grow. In particular, try to limit the number of administrators and other user roles with high privileges.

DreamHost Glossary

User Role

Users in WordPress can be one of six default roles: Super Admin, Administrator, Editor, Author, Contributor, or Subscriber. WordPress provides a user role management system that defines what users are allowed to do on your website.

Read More

Here are a few other best practices:

  • Limit each user to only what permissions are necessary for them to do their job.
  • Encourage users to use strong passwords.
  • Try to stick with one administrator and a small group of editors.
  • Remove users who have left the site or no longer need access.
  • Regularly log out idle users (the Inactive Logout plugin is great for this!).
  • Consider downloading a plugin like Members, which provides a user interface for WordPress’ role and capabilities system.
Content permissions settings on WordPress

10. Limit Login Attempts

Everyone forgets their password sometimes. But good news! By default, WordPress allows an unlimited number of guesses.

But is that really good news? Brute force attacks, or attacks where a hacker tries any number of passwords, are one of the most common ways hackers gain access to private accounts. With no limit on login attempts, a hacker or bot could try every password in the book with no consequences.

First, check your Web Access Firewall (WAF) to limit the number of login attempts a user can make. If your firewall is already set up, a limit will already be in place, but you can also use a separate plugin for that! Both Login Lockdown and Cerber Limit Login Attempts record the IP address and time stamp for each failed login attempt, let you limit the number of failed attempts allowed in a certain span of time, and lock out IP addresses that exceed the limit. Both plugins are free, but Login Lockdown is simpler and more beginner-friendly. If you require a more robust system, Cerber Limit Login Attempts is the way to go, allowing not only IP white/blacklisting, but also notifying admins if a certain number of lockouts is reached.

11. Track Your Admin Area Activity

If you have multiple users, keeping tabs on what they’re all doing on the site is a good idea. Tracking activity in your WordPress admin area will help you spot when other users are doing things they shouldn’t — and can help you spot when unauthorized users have gained access.

But you also need a tool to help you see who is behind different site activities — like when someone makes an unauthorized change or a suspicious new install. For that, you need another plugin. Simple History lives up to its name by creating a streamlined, easy-to-understand log of changes and events on your site.

For more comprehensive tracking features, check out WP Security Audit Log, which tracks just about everything that happens on your site and offers premium add-ons.

Session timeouts keep WordPress secure

12. Password Protect Your Login Page

The login page is the most likely way for hackers to access your website, so protecting it is a great way to protect the rest of your site. This can be a bit technical, but it’s still worth learning. Use this tutorial to learn how to create an htaccess file and add a password prompt to your login page. A login for your login — what will they think of next?

And if you’re hosting content that not everyone needs to see, you can password protect other parts of your site. For blog posts and other pages, you can add password protection by going into pages >> all posts option. Click “edit,” and you’ll see the option to change the visibility to “Password Protected”. Just publish, and badabing-badaboom, that page is locked up tight!

13. Hide Your Login Page

Adding password protection to your login page is great, but even better is if hackers can’t even find it. Changing your wp-admin and wp-login pages is easy and helps deter hackers who can easily find your login page if you leave default settings in place.

There are several plugins that can redirect the default login page to another page of your choosing. Many plugins offer this as part of a larger package (for example, Defender also includes a malware scanner and firewall). But if you’re looking for something simple, try WPS Hide Login, which just hides your login. Just don’t forget to bookmark your new login page so you can find it.

14. Update PHP

Just like America runs on Dunkin’ (don’t quote us there), WordPress runs on PHP. Updating WordPress isn’t enough to keep your site safe and secure — you need to make sure you’re using the latest version of PHP, too.

Normally, each PHP version is supported for at least two years after its release date, meaning vulnerabilities are addressed by the engineers who designed the code. When the code goes out of date (or reaches its EOL or “end of life”), it’s time to upgrade, or you risk being exposed to security concerns, performance slowdowns, and bugs galore.

To see which version of PHP you’re currently running, log in to your WordPress site, and select Tools >> Site Health. Navigate to Info and then Server, and view your current PHP version.

15. Secure Your WordPress Database

Leaving anything at the default settings is a boon for hackers, and by default, WordPress uses wp_ as the prefix for all of your related tables. Good news! If you’re using the One-Click Installer, you already have a prefix of random letters and numbers. As long as it ends with an underscore, the system is happy. Better News! Even if your WordPress is already installed, it may be eligible for the One-Click Installer as long as the site is fully hosted and meets a few other guidelines.

Just note that breaking something can be as easy as a missing underscore. Luckily, there is a default version of the wp-config.php file available at WordPress Core, so you can quickly and easily rebuild — whether you tried to change the database prefix manually, or with a service like phpMyAdmin.

16. Add Security Questions

Security question plugin for WordPress

Security questions are often overlooked, but they give extra oomph to your security. Depending on the plugin you choose, you’ll either choose from existing security questions or create your own.

17. Hide Your WordPress Version

Security through Obscurity — if they can’t find it, they can’t hack it!

Hide which version of WordPress you’re using (or hide that you’re using WordPress altogether) by altering the header code. If that sounds too technical, use a plugin like WPCode. Just make sure to alter the code and not just edit the display information in your theme settings — those snippets of code will only return during the next theme update.

18. Prevent Hotlinking

Hotlinking is the act of stealing bandwidth by using files hosted on one site and linking them to another. For example, let’s say someone draws a pretty clever comic, and some other website wants to feature it without permission. They could hotlink the comic instead of hosting it on their own servers, costing the original website more bandwidth, and therefore more money.

To prevent hotlinking, you can choose to reject certain domains, allow only certain domains, or remove the ability to hotlink altogether, all by making a few changes to your htaccess file. You can even include a snippet in your .htaccess file that routes all hotlinking attempts to a page or image of your choice — perhaps one that says, “Stop hotlinking, freeloader!”

19. DDoS Protection (Disable XML RPC)

A Distributed Denial of Service attack (or DDoS) is when a hacker uses multiple systems to send a huge volume of data and overwhelm their target. This can slow down and crash their target — imagine a huge traffic jam for your website where no legitimate traffic can get in.

We know that patience is hard to come by online, with the average user waiting only 3 seconds for a page to load before clicking away, so the sooner you can identify and resolve an attack on your website, the better.

While preventing a DDoS attack may seem daunting, one of the first steps you can take is to remove or disable any old or unutilized plugins. Plugins are incredibly handy, but by increasing functionality, they also have access to your website that can be exploited. For once, downloading more plugins is not the answer!

XML-RPC allows WordPress access through the app on your mobile device. If you don’t use your smartphone to make changes to your WordPress website, you likely don’t need this feature enabled. Turning it off involves adding a quick snippet of code to your htaccess file, and you’ll be all the safer for it.

20. Malware Scanning

Malware (short for malicious software) hides in what appears to be safe applications so that the user doesn’t know their computer or website has been infected.

Malware scanning is an important defense that works by using anti-malware software to identify and isolate suspicious files until you decide if they need to be removed. If a threat is detected, a good malware scanner will delete any trace of it from your computer ASAP. Luckily, several firewall plugins come with malware scanning built in, so make sure to check your security plugins to see what they offer.

If you have DreamHost as your hosting platform, you can activate DreamShield to handle daily malware scanning for you.

WordPress Security: Locking It Up

If your website is hacked, you’ll spend hours (perhaps even days) trying to repair the damage. You may permanently lose data or see your personal information compromised — or worse: your clients’ data.

That’s why you have to put enough time and energy into making sure your site is secure. Otherwise, you just risk losing valuable business and precious time.

These WordPress security tips should help. Some are simple tweaks, while others affect your entire site. But if you’re looking for one impactful change you can make today to keep your site secure, make sure it runs on a secured WordPress host.

DreamPress hosting (with free WordPress migration) is specifically designed for the WordPress environment. Plus, if you ever do encounter a security issue, we’ve got you covered with automatic daily backups, a daily malware scan, and our support team of WordPress experts! Ready to protect your site from threats and vulnerabilities? Learn more about DreamPress hosting today.

Ad background image

Launch Your Website with DreamPress

Our automatic updates and strong security defenses take server management off your hands so you can focus on creating a great website.

Check Out Plans

The post Everything You Need To Know About WordPress Security (+20 Hardening Tips) appeared first on Website Guides, Tips & Knowledge.

]]>
Why It’s a Good Idea to Change Your WordPress Login URL (& How to Do It) https://www.dreamhost.com/blog/change-wordpress-login-url/ Mon, 12 Dec 2022 17:36:20 +0000 https://dhblog.dream.press/blog/?p=38314 A strong, unique password can help prevent unauthorized access to your WordPress website. However, attackers have clever ways of getting around this. Therefore, it isn’t always enough to properly protect your site against attacks. Fortunately, you can reduce the risk of hackers getting into your site by moving your WordPress login page to a new […]

The post Why It’s a Good Idea to Change Your WordPress Login URL (& How to Do It) appeared first on Website Guides, Tips & Knowledge.

]]>
A strong, unique password can help prevent unauthorized access to your WordPress website. However, attackers have clever ways of getting around this. Therefore, it isn’t always enough to properly protect your site against attacks.

Fortunately, you can reduce the risk of hackers getting into your site by moving your WordPress login page to a new URL. This can put you in a better position to defend against hacks and brute-force attacks.

This article will take a closer look at why you should consider changing your WordPress login URL. Then, we’ll show you how to find your login URL and modify it using two different methods. Let’s get started!

Why It’s a Good Idea to Change Your WordPress Login URL

Since WordPress doesn’t hide your login page, any user can find it as long as they know how WordPress structures its URLs. The default structure for a login page looks something like this:

https://example.com/wp-login.php

This means when a user plugs in your website name into the URL structure above, they should see a page in their browser prompting them to log in to the back end of your website:

WordPress login page

Of course, users will lack the credentials to gain access to your site.

For simplicity’s sake, many people prefer to stick with this default wp-login structure for signing into WordPress. However, by leaving this as it is, you’re actually handing over half of your login credentials to attackers.

This is especially risky if your password is common, weak, and easy to guess. In a nutshell, this is an unnecessary vulnerability that’s easy to resolve.

You can secure your login page more thoroughly by changing your WordPress login URL. As a result, you can prevent unauthorized access to your site and reduce the risk of brute-force attacks.

How to Find Your WordPress Login URL

As we mentioned in the previous section, WordPress uses a standard sign-in link structure that looks something like this:

https://example.com/wp-login.php

So, all you have to do is add the suffix to your domain, and you should land on your login page. You can also find your login page by trying to access your WordPress dashboard while logged out. Simply enter “yourwebsite.com/wp-admin” into the search bar and you’ll land on the same login page.

However, keep in mind that some web hosts change your WordPress login page automatically for security reasons. Therefore, you might already have a custom login URL. We’ll show you how to find this in the next section.

How to Find a Custom WordPress Login URL

If your web host has changed your login URL, you can usually retrieve it from an email or locate it within your control panel. Some hosts even include one-click access links to the WordPress admin dashboard, which can be useful.

However, if you can’t identify your custom login URL using one of those options, you can locate it manually. All you’ll need to do is connect to your site using SFTP.

You can use a client like FileZilla. Keep in mind that you’ll need your FTP credentials, which you can get from your web host. Then, open the root folder that contains the login link. This folder is usually labeled public_html:

Website root folder in File Manager

Find and open the wp-login.php file, keeping an eye out for the string that reads site_url. This will lead to a line of code that specifies your custom login URL.

How to Change Your WordPress Login URL (2 Ways)

Now that you know where to find your WordPress login URL let’s take a look at two easy ways you can change it.

Method 1: Change Your WordPress Login URL with a Plugin

The easiest way to change your WordPress login URL is by using a plugin. Luckily, there are plenty of plugins available that can enable this functionality.

WPS Hide Login is a great option since it’s lightweight. It allows you to safely change your WordPress admin login page to anything you want:

WPS Hide Login plugin

Better yet, WPS Hide Login also prevents all logged-out users access to the wp-admin directory and wp-login.php.

To get started, you’ll need to install and activate the plugin. Then, head to Settings > WPS Hide Login:

Configure the WPS Hide Login plugin on WordPress

Here, you can type in a new login URL and hit Save Changes. It’s as simple as that. The plugin also has a pretty active support forum that you can check out if you need any help.

Bear in mind that once this plugin is active and you make your changes, you won’t have access to your old login screen. Instead, you’ll be directed to the new login you created.

Based on our example above, you would now need to enter “/login” after your domain to access your site. Additionally, keep in mind that your site will revert back to using wp-admin and wp-login.php if you deactivate the plugin.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Method 2: Change Your WordPress Login URL by Editing Your wp-login.php File

This second method is a little trickier and only suitable for experienced users. Therefore, before you get started with the following steps, it’s best to make a fresh backup of your site in case anything goes wrong.

It’s also important to know that your changes may revert to their previous settings when you update your theme. However, you can avoid this issue by using a child theme.

First, you’ll need to access your root folder, which you can do via your File Manager or using FTP. Again, you’re looking for the folder titled public_html:

Root folder of website

Inside the root folder, locate the wp-login.php folder. This is where the code that generates your site’s login page is kept:

The “wp-login.php” file

Once you’ve found the file, you can download a copy of it to your computer. Then, open the folder using a text editor like Sublime or Notepad++.

Ideally, it’s best to use an editor that provides a “search and replace” tool. This way, you can change all the existing WordPress login URL instances much more quickly.

If you have access to it, use the search tool to find every instance of the wp_login_url string:

The “wp-login.php” file

Then, change these strings to the new login URL that you’d like to use. Remember, you can keep it simple and straightforward so long as it’s original (and different from the default). For example, you might prefer something like access.php or wp-new-login. 

Once you’re happy with your changes, save and close the editor. Then, rename the file after the new URL that you chose (such as access.php).

Now, you can upload the new file to your root directory using your FTP client or File Manager. Simply select the modified login file from your computer. Then, register the new login file using the “login_url” filter hook. This enables you to use any page as your sign-in page as long as it contains a login form.

To do this, navigate to wp-content > themes to find your theme functions file. Select your active theme and open the functions.php file:

Finding the theme functions file

Now that you’re here, you can paste the following line of code into the file:

/*
*Change WP Login file URL using “login_url” filter hook
*https://developer.wordpress.org/reference/hooks/login_url/
*/
add_filter( ‘login_url’, ‘custom_login_url’, PHP_INT_MAX );
function custom_login_url( $login_url ) {
$login_url = site_url( ‘wp-your-new-login-file-name.php’, ‘login’ );
return $login_url;
}

Then remember to save your changes.

It’s important to test your new login before deleting the old file. To do this, simply type out your site’s domain with your new login URL added to the end. Then, if you see the WordPress login form, you can delete the original wp-login.php file. 

Other Ways to Secure Your WordPress Login Process

Changing your WordPress login URL is great for tightening up security on your site. However, it’s not all you can do. Here are some other ways to secure your WordPress login process.

1.  Limit Login Attempts

When you limit login attempts, you can stop hackers and bots that attempt to access your site by trying hundreds of usernames and passwords. This is especially important since brute force attacks are the second most common type of online threat.

The easiest way to do this is by using a plugin like Limit Login Attempts Reloaded:

Limit Login Attempts Reloaded plugin

This plugin gets to work as soon as it’s activated on your site. By default, users have four chances to log in before they get locked out of WordPress. However, you can visit the plugin’s settings to modify this:

Configure the Limit Login Attempts Reloaded plugin on WordPress

Here, you can also determine the length of time that users stay locked out. In your dashboard, you’ll see how many brute-force attacks have been blocked by the plugin. Plus, you can switch to the Logs tab to manually blocklist specific IP addresses.

Implement Two-Factor Authentication

Two-factor authentication requires users to submit more than just their standard login credentials. Instead, users are asked to generate a second key in real-time. This is often a code sent via SMS text message, email, or an app:

An example of two-factor authentication

Since bots and hackers are unable to produce the second key, this is a great way to prevent unauthorized access to your site. One of the best ways to add this functionality to your site is by using a plugin like miniOrange:

miniOrange two-factor authentication plugin

Once activated, head to the new miniOrange 2-Factor link in your admin area and find the Account section. To configure the plugin, you’ll have to register for an account. This is completely free and only takes a minute. Then, you’ll receive a code that enables you to verify your email.

At this stage, navigate to Two Factor and use the Setup Two Factor tab. Here, you can choose your preferred method of authentication. For instance, you can use the Google Authenticator app, SMS text messages, QR codes, or security questions:

Enabling two-factor authentication on WordPress using miniOrange

Lastly, if you switch to Settings, you can enable two-factor authentication for all users, specific users, and display your two-factor prompt on your login page.

3. Use CAPTCHA

CAPTCHA or reCAPTCHA provides an extra layer of security for your website. Typically, it’s used to control access to sensitive pages. What’s more, it can deter bots from creating spam or accessing personal information via order forms or login forms on your site.

Again, a plugin is the easiest way to enable CAPTCHA on your site. With reCaptcha, you can add a simple CAPTCHA checkbox to any form you like:

reCaptcha plugin

You’ll need to install and activate the plugin on WordPress. Then, register your site with Google to retrieve your Google API keys. In WordPress, you can head to Google Captcha > Settings to enter your keys and determine which forms should use CAPTCHA.

4. Enforce Strong Passwords

It’s a great idea to change the WordPress login URL, so you’re not using the easily-guessable “admin” suffix. However, your efforts are wasted if you continue using weak or repeated passwords that put your account at a greater risk of attack.

In fact, only 24% of U.S. web users use a different password for each of their online accounts. Meanwhile, just 44% of users use a password manager to generate and store passwords securely.

Going forward, it’s best to opt for lengthy passwords with upper and lower case letters combined with numbers and special characters. We’d also recommend using a password manager like LastPass for extra peace of mind:

LastPass password manager

Plus, it’s important to encourage strong passwords from users with access to your website. You can clarify this in the welcome email users receive upon registering to your site.

Change Your WordPress Login URL to Increase WordPress Security

It can be challenging to ensure foolproof security on your WordPress website. Fortunately, one way you can do this is by changing your WordPress login URL. This way, your login page is almost impossible to find unless you provide users with your new, custom login URL.

Here are two ways to change the WordPress login URL:

  1. Use a plugin like WPS Hide Login.
  2. Edit your wp-login.php file.

Another excellent way to tighten WordPress security is to use a quality web host. At DreamHost, we offer a range of solutions to suit all kinds of users, from managed WordPress hosting to managed VPS hosting. Check out our plans to get started!

Ad background image

Do More with DreamPress

DreamPress Plus and Pro users get access to Jetpack Professional (and 200+ premium themes) at no added cost!

Check Out Plans

The post Why It’s a Good Idea to Change Your WordPress Login URL (& How to Do It) appeared first on Website Guides, Tips & Knowledge.

]]>
Minification in WordPress: What it Is and How to Do It https://www.dreamhost.com/blog/guide-to-wp-minification/ Fri, 07 Oct 2022 14:00:35 +0000 https://dhblog.dream.press/blog/?p=37351 As you add more tools and content to your site, the number of files will expand, leading to slower loading times. Speed matters on the internet, so a slow-loading site can be a big problem. One way you can combat this problem is through minification. This is the process of compressing certain files (such as […]

The post Minification in WordPress: What it Is and How to Do It appeared first on Website Guides, Tips & Knowledge.

]]>
As you add more tools and content to your site, the number of files will expand, leading to slower loading times. Speed matters on the internet, so a slow-loading site can be a big problem.

One way you can combat this problem is through minification. This is the process of compressing certain files (such as CSS, JavaScript, and HTML files) to shrink their size without impacting their functionality. The best part is you don’t even need any coding know-how to minify these files!

What is Minification?

Every second counts on the internet. As websites become more optimized, many people have been primed to expect fast loading times. In fact, almost half of all internet users expect sites to load in two seconds or less.

When a single-second delay can result in a seven percent reduction in conversions, being stuck with a slow site can be a death sentence. Fortunately, there are remedies to help you speed up your site, including minification.

This refers to the process of compressing Cascading Style Sheets (CSS), JavaScript, and HTML code without affecting the functionality of these files. You may not realize it, but many of the files that keep your site running can also be slowing it down.

This minification process may sound overly technical on the surface, but it’s very straightforward. It simply involves removing unnecessary characters from the code.

Let’s look at an example. Here’s what a normal CSS snippet might look like:

#bluetext {
font-size: 2em;
color: blue;
}
#redtext {
font-size: 1em;
color: red;
}

If you were to minify this code, the result might end up looking like this:

#bluetext{font-size:2em;color:blue;}#redtext{font-size:1em;color:red;}

All of the required information is still there, but the line breaks, spaces, and some other characters have been removed. These elements are not necessary for a computer to understand the code and only exist to make it more readable to humans.

It may not seem like this minor change would have a big effect, but think about how many lines of code you have running under your site’s hood. Minification can significantly cut down the size of each file, which will, in turn, make your site load faster. This is especially true if your site contains a large number of files, scripts, and plugins.

We’re now going to look at two methods you can use to minify code, both manually and with a dedicated plugin.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

How to Minify CSS and JavaScript Manually

Manual minification lets you quickly compress CSS and JavaScript code using a dedicated application. This enables you to write code that’s easy to read and interpret first, before minifying it with a tool in seconds.

To start minifying CSS, we recommend using a tool such as CSS Minifier, CSS Minify or Clean CSS.  With JavaScript, Minify can be a good starting point. However, there are alternatives such as JSCompress and JavaScript Minifier.

Fortunately, the tools will all work in the same way. For example, using Clean CSS, you’ll just need to paste your original code into the relevant field and click on CSS Minify. You’ll see the results in the other field, which you can then copy and paste into your site:

minify your CSS files in WordPress

We recommend saving both versions of the code. Otherwise, you risk losing the original code. The original will be easier to troubleshoot and edit than the minified version.

Additionally, we recommend that you only use manual minification if you are confident in your coding abilities. If you don’t have a lot of experience, you might want to use a WordPress minification plugin instead.

2 Plugins to Help Minify Your WordPress Files

Using a WordPress plugin, you can automatically minify the CSS and JavaScript files that keep your site running. However, since these files are so vulnerable, you’ll want to make sure that you use a plugin that’s trusted and safe. Here are two minification plugins we recommend.

1. Fast Velocity Minify

Fast Velocity Minify

Fast Velocity Minify is a great choice for both novices and experienced users. By default, it offers automatic minification of all CSS, JavaScript, and HTML code on your site without any additional configuration. However, it also provides a huge amount of additional options if you want to tinker with the specifics.

Key features:

  • Requires minimal configuration and runs automatically in real-time
  • Offers extensive options for advanced users
  • Provides great results and reliable support

Pricing: Fast Velocity Minify is open-source and completely free.

2. Autoptimize

WordPress Autoptimize plugin for minifying files and speeding up WordPress website

Autoptimize is one of the more popular minification plugins (and for good reason). It will bundle your files together, optimize them, and cache them to create as few requests to the site as possible. While it does offer some additional options, this plugin is ideal for those who want a ‘set and forget’ approach to minification.

Key features:

  • Easy for beginners to grasp
  • Additional options for more optimized performance
  • Advanced customization using the dedicated API

Pricing: The Autoptimize plugin is free, although the developers also provide premium configuration services including personal installation and optimization tailored to your site.

How to Minify WordPress Files With a Plugin

Now that you’re familiar with the tools available, you can start minifying your WordPress files. For this tutorial, we’ll be using the Fast Velocity Minify plugin. This is because it’s easy to implement for beginners, while still offering a great deal of optional configuration for advanced users.

Once you’ve installed and activated the plugin, you don’t need to do anything else — your site is now ready for minification.

The next time somebody visits your site, the plugin will intercept your files and create a copy of them. It will then group the files and minify their coding to cut down on the number of requests. These optimized files are saved in the cache and used whenever the site is accessed again. This means your original files will be unaffected.

If you’re a more experienced user, the plugin does offer some advanced settings. You can access them by going to Settings > Fast Velocity Minify within WordPress:

Fast Velocity Minify settings in WordPress

Among other options, you can disable minification for certain files, exclude specific assets from the process, and determine the cache’s location. You can also purge any minified files and allow code processing on specific query strings:

Fast Velocity Minify settings in WordPress

However, we recommend leaving all the default settings as they are unless you know exactly what you’re doing. The plugin is set to automatically minify all CSS, JavaScript, and HTML code, which will be enough to have a positive effect on most sites.

Minify Your WordPress Files Today

Minifying your WordPress files is a quick and simple way to improve your site’s performance.

This way, you can make sure that you don’t lose visitors due to long loading times.

It may seem like a technical nightmare to accomplish, but you don’t actually need technical knowledge of CSS or JavaScript to minify your WordPress files. A plugin like Fast Velocity Minify can do all the work for you.

Ad background image

Do More with DreamPress

DreamPress Plus and Pro users get access to Jetpack Professional (and 200+ premium themes) at no added cost!

Check Out Plans

The post Minification in WordPress: What it Is and How to Do It appeared first on Website Guides, Tips & Knowledge.

]]>
Speed Up Your WordPress Website with Gzip Compression https://www.dreamhost.com/blog/guide-to-gzip-compression/ Thu, 06 Oct 2022 14:00:59 +0000 https://dhblog.dream.press/blog/?p=37321 Keeping your website running at top speed is essential. A speedy website can provide a huge boost to your site’s user experience, search engine visibility, and improve your professionalism and reliability. Gzip compression is one popular method to speed up your site. While the term may sound technical, the basic concept isn’t too complicated. What’s […]

The post Speed Up Your WordPress Website with Gzip Compression appeared first on Website Guides, Tips & Knowledge.

]]>
Keeping your website running at top speed is essential. A speedy website can provide a huge boost to your site’s user experience, search engine visibility, and improve your professionalism and reliability.

Gzip compression is one popular method to speed up your site. While the term may sound technical, the basic concept isn’t too complicated. What’s more, enabling Gzip compression on your WordPress site is surprisingly easy. Let’s find out more!

An Introduction to Gzip Compression

compressing the CSS stylesheet with Gzip

As your site expands, many of its files grow in size as well. This is a natural result of adding more content, plugins, themes, and custom code to your site. All of that new data has to be stored somewhere.

The downside of larger files is that they often take more time to load when your pages are accessed. This means your visitors will end up waiting longer to view your content — which is never a good thing. To deal with this problem, you need to find a way to make your site’s files smaller without losing any important information.

This is exactly what Gzip compression does. It reduces the size of your files by ‘compressing’ them, removing unnecessary characters, and reorganizing data more efficiently.

If you’ve ever ‘zipped’ a folder to make it smaller, this is a similar concept. Gzip compression can reduce the overall size of your pages by up to 70%, and nothing crucial is lost in the process.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

How to Enable Gzip Compression on Your WordPress Site (2 Methods)

There are a lot of ways to speed up your WordPress site. For example, choosing an optimized hosting plan is key. However, Gzip compression can improve your page speeds even further, so it’s worth implementing.

Below, we’ll show you two ways to get started with Gzip compression. Keep in mind that the first thing you’ll want to do is make sure you have a recent backup of your site in place as a safety precaution. Then you can read through both methods and choose the one you prefer!

Method 1: Use a Plugin

You may struggle to find a quality plugin exclusively designed to implement Gzip compression. Fortunately, you don’t need one. Many speed optimization plugins include an option for Gzip compression as a part of their feature sets.

For a perfect example, check out WP Super Cache:

WP Super Cache WordPress plugin

This plugin is primarily a caching solution, which is another smart way to speed up your WordPress site. However, it also enables you to compress your files.

After installing and activating the plugin, you’ll need to navigate to Settings > WP Super Cache and switch over to the Advanced tab:

enabling Gzip compression in the WP Super Cache WordPress plugin

Find the option labeled Compress pages so they’re served more quickly to visitors, and check the box next to it. Then click on the Update Status button to save your changes.

That’s all you need to do — the plugin will now implement Gzip compression automatically!

2. Modify Your .htaccess File

While the above technique is the simplest way of enabling Gzip compression on your WordPress site, some users will be more interested in an alternative method. For instance, if you’re trying to limit the number of plugins you install on your site, you might prefer to implement Gzip compression manually.

To do this, you’ll need to use the Secure File Transfer Protocol (SFTP). It enables you to directly access (and make changes to) your site’s files.

If you’ve never used SFTP before, you’ll first want to install a suitable client, such as FileZilla (and brush up on your SFTP skills). Then you’ll need to establish a connection to your site using your hosting credentials.

Once you have FileZilla set up, it should look something like this:

editing files in an FTP client

In the top right quadrant, find the folder named after your website’s domain and select it. Then, in the bottom right quadrant, look for the file called .htaccess. This is one of your site’s core files, so you should always be very careful when making changes to it:

enabling Gzip compression by editing CSS stylesheet in WordPress

Right-click on the .htaccess file and select Download to save it to your computer. Then open the file in any text editor (such as Notepad), and paste in the following code:

<IfModule mod_deflate.c>

# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml

# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

</IfModule>

Don’t forget to save your changes to the file. After that, you can re-upload it to your site by copying and pasting it back into your website’s root folder (or simply dragging it there from your computer). Now you’ve enabled Gzip compression on your WordPress website manually!

Note that this method is for websites with Apache servers. If your site runs on NGINX, we recommend checking out this tutorial on enabling Gzip compression with NGINX.

Speed Up Your WordPress Site with Gzip Compression

There are a lot of ways to make sure your WordPress site runs fast and efficiently. For example, you’ll want to choose an optimized hosting plan with a reputation for speed. After that, you can make plenty of smaller tweaks to maximize your site’s performance, such as using Gzip compression to reduce file sizes.

Ad background image

Do More, Faster, with DreamPress

DreamPress' automatic updates, caching, and strong security defenses take WordPress management off your hands so you can focus on your website.

Check Out Plans

The post Speed Up Your WordPress Website with Gzip Compression appeared first on Website Guides, Tips & Knowledge.

]]>
A Comprehensive Guide to Website Caching https://www.dreamhost.com/blog/a-comprehensive-guide-to-website-caching/ Wed, 20 Apr 2022 14:00:15 +0000 https://dhblog.dream.press/blog/?p=33608 As a website owner, one of your main goals is to drive more traffic to your site. However, if your visitors experience slow page speeds once they get there, this can cause them to leave without reading your content. In this scenario, all of your hard work will have gone to waste. Fortunately, you can […]

The post A Comprehensive Guide to Website Caching appeared first on Website Guides, Tips & Knowledge.

]]>
As a website owner, one of your main goals is to drive more traffic to your site. However, if your visitors experience slow page speeds once they get there, this can cause them to leave without reading your content. In this scenario, all of your hard work will have gone to waste.

Fortunately, you can improve User Experience (UX) by implementing caching on your website. This involves saving a copy of your site’s files so visitors don’t have to wait for this data to be sent from the web server to their browser. Caching your site can effectively improve loading times and avoid overworking your server.

In this post, we’ll talk about caching and how it can benefit your website. Then, we’ll show you how to implement caching in WordPress using two different methods. Let’s get started!

An Introduction to Caching

When someone visits your website for the first time, their browser requests your origin server to send over the site’s data. This usually only takes a few seconds, but there are a few factors that can slow down this process.

Most web servers require a physical server location, so geography matters. If the user is very far away from your server, they’ll likely face slow page speeds. Your site may also load slower if your content contains lots of images or large files.

This is where caching comes into play. Caching reduces content delivery time by saving a copy of your website upon an initial visit. That means when a user visits your site a second time, the saved cache is ready and waiting. This can prevent the browser from using its resources to load the entire site files again.

Types of Caches

There are many different types of caches, but these are two of the most common choices:

  • Client-side caching. This happens when a web browser stores a copy of a website’s data onto a user’s hard drive. A browser cache can avoid downloading the same data every time, which can strain the server.
  • Server-side caching: Instead of storing site files on a user’s hard drive, this web cache saves data on the server. This commonly involves using a Content Delivery Network (CDN).

Less common but also a good option, is object caching. This technique saves database queries to limit the number of requests sent to a database. Additionally, opcode caching saves a compiled PHP code to a server’s memory.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

The Benefits of Website Caching

Regardless of the type you use, caching can lead to better page loading speed and Search Engine Optimization (SEO). Plus, this can improve your visitors’ experience when they return to your site a second time.

Moreover, one of the main benefits of caching is that it can improve site performance. That’s because when you enable caching, your content can load much faster. By saving files locally, browsers can easily access your website without having to request your site files over and over.

Related Article
Your Guide to Improving SEO Rankings
Read More

Furthermore, studies show that if your content takes more than three seconds to load, 40% of users will abandon your site. Therefore, when you implement caching, you can easily decrease your bounce rates. By doing this, you can create a less frustrating experience for your visitors.

Additionally, caching your site’s files can help improve SEO. That’s because when Google evaluates your site, it considers page speed as a search ranking factor. This means that caching can be just as important as other SEO techniques such as targeting keywords..

Although caching can speed up your website on follow-up visits, your browser will continue to process initial HTTP requests. Along with caching, you should consider other reasons for slow page speed and try to optimize your content for performance..

If you’re not sure how fast your website is, you can easily test its speed. Using a tool such as Pingdom, you can search for your URL to analyze your loading time:

Pingdom Speed Test

Keep in mind that you shouldn’t be discouraged by any negative results. You can quickly and easily fix this problem by upgrading your hosting plan, optimizing CSS files, and implementing caching.

Related Article
Optimize Your WordPress Website for Speed
Read More

How to Implement Caching in WordPress (2 Methods)

Once you decide that caching is a good option for your website, it’s time to implement it. Although you can manually enable caching with HTTP headers, there are some simpler alternatives. Let’s discuss two easy methods to cache your WordPress site!

1. Use Your Host’s Caching Service

Before you install a caching plugin, it’s a good idea to see if your hosting provider already has a caching service. Most web hosts have a preferred method that may already be set up on your website.

Here at DreamHost, our managed WordPress hosting plans come with built-in caching. Using this option, you won’t have to worry about installing a plugin and learning its configuration:

WordPress Managed Hosting

When you sign up for a DreamPress plan, you’ll receive a built-in server cache. In your WordPress dashboard, you’ll also see that the Proxy Cache Purge plugin comes preinstalled:

Proxy Cache WordPress Plugin

This caching plugin is a tool that you can use to manage your cache. If you open the Check Caching page, you can enter the URL of your website or a specific page:

Proxy Cache WordPress Plugin

Then, click on Check URL to view a report of any caching issues. You’ll also be able to view information about your active cookies, as well as any theme conflicts:

WordPress website caching results

If your website receives lots of international visitors, you may also want to use a Content Delivery Network (CDN). This is a globally-distributed group of servers that cache your website’s content, which speeds up loading times even when users are distanced from your server.

Some web hosts provide a CDN with their plans. For example, our advanced managed hosting options come with an unlimited CDN provided by Cloudflare. If you want to implement this caching service on your website, you can take a look at our DreamPress Plus and Pro plans.

2. Install a Caching Plugin

If your web host doesn’t provide a built-in caching service, you can install a caching plugin. This is likely necessary if you self-host your website or have a shared hosting plan. Most caching plugins provide customizable settings, which are simple for beginners to configure.

However, with so many options available, you might not know how to pick the right plugin. When reviewing any tool, be sure to keep these factors in mind:

  • Features: It’s important to evaluate each plugin’s description to see how it works and if it would be an effective option for your site’s data.
  • Reviews and ratings: Often, high user ratings can tell you if other website owners have found success using a certain plugin or if they’ve frequently had issues with it.
  • Updates: To prevent incompatibilities, it’s a good idea to only install plugins that have been updated in the past six months.
  • Support: When you experience a problem, you’ll want to receive fast, informative help from the plugin’s developers.
  • Price: Many caching plugins are free, but the premium versions can offer extended features and support.

Once you pick the right option for your website, consider using it on a staging site to test its functionality and performance.

Top 3 Caching Plugins

Now that you know what to look for, let’s go over our top picks for caching plugins!

1. WP Super Cache

WP Super Cache

Since it was developed by Automattic, WP Super Cache is one of the most popular WordPress caching plugins. It works by generating static HTML files instead of heavy PHP scripts. This allows 99% of your visitors to experience a faster loading speed after this caching process.

One of the main benefits of WP Super Cache is its three different caching modes. Whether you are a beginner or an expert, you can select a caching option to meet your needs. For example, beginners can avoid editing PHP files by setting the plugin to the ‘Simple’ mode.

Features:

  • 3 caching modes (Simple, Expert, and WP-Cache caching)
  • Enable cache timeouts or schedule garbage collection
  • Integration with OSSDL CDN off-linker
  • REST API endpoints

Price: WP Super Cache is a free WordPress plugin.

2. WP Rocket

WP Rocket

If you need a powerful caching plugin without an extensive configuration process, consider installing WP Rocket. This plugin automatically applies 80% of best practices when it comes to web performance. With only a few clicks, you can start optimizing your WordPress website for speed.

Although WP Rocket doesn’t offer a free version, its cutting-edge speed technology is worth considering. With just its basic features, WP Rocket enables page caching, browser caching, and GZIP compression. Plus, you can also use this plugin to delay JavaScript execution, remove excess CSS, and edit the display options for images and iframes.

Features:

  • Page and browser caching
  • GZIP compression
  • Compatible with popular themes and plugins
  • Ecommerce optimization

Price: WP Rocket subscription plans start at $49 per year. This includes plugin updates and support for one website.

3: LiteSpeed Cache

LightSpeed Cache

Unlike the other plugins on this list, LiteSpeed Cache creates a server-level cache. It works alongside your server, pointing out cacheable web pages. This plugin is best used with a LiteSpeed Web Server, but its QUIC.cloud CDN service enables you to use LiteSpeed cache with any server.

With the LiteSpeed Cache plugin, you can store a copy of your website content to reduce your number of server requests. This tool includes automatic page caching, with separate web caching for both mobile and desktop views. Using this tool’s simple interface, even beginners can customize their image and page optimization.

Features:

Price: LiteSpeed Cache is a free plugin. However, you’ll need to have a LiteSpeed Web Server or QUIC.cloud CDN service to access this server-level cache.

Keep Website Visitors Happy with Faster Load Times

Ultimately, caching your WordPress website is one of the best options for speeding up your content. After you implement a browser or server-level cache, returning visitors can access your website using its cached data. This avoids the need to completely reload heavy files a second time.

To get started with caching, you can easily install a caching plugin such as WP Super Cache. Due to its customizable caching modes, you can choose an option that aligns with your experience level. Plus, it’s absolutely free.

As an easier alternative, you can use the caching service from your hosting provider. Here at DreamHost, our managed WordPress hosting solutions optimize your website’s speed with a built-in cache. Check out our hassle-free DreamPress plans today!

Ad background image

Do More with DreamPress

DreamPress' automatic updates, caching, and strong security defenses take server management off your hands so you can focus on content creation.

Check Out Plans

The post A Comprehensive Guide to Website Caching appeared first on Website Guides, Tips & Knowledge.

]]>
How to Improve Core Web Vitals (8 Ways) https://www.dreamhost.com/blog/improve-core-web-vitals/ Fri, 15 Apr 2022 14:00:14 +0000 https://dhblog.dream.press/blog/?p=33504 Google uses a handful of ranking signals to measure and assess websites. Among the most recent and important Page Experience scores are Core Web Vitals. If you’re not optimizing your site for these metrics, you might be hurting your Search Engine Optimization (SEO) and overall User Experience (UX). The good news is that once you […]

The post How to Improve Core Web Vitals (8 Ways) appeared first on Website Guides, Tips & Knowledge.

]]>
Google uses a handful of ranking signals to measure and assess websites. Among the most recent and important Page Experience scores are Core Web Vitals. If you’re not optimizing your site for these metrics, you might be hurting your Search Engine Optimization (SEO) and overall User Experience (UX).

The good news is that once you understand what Core Web Vitals are and how to measure them, you can take active measures to improve them. This can help ensure you’re providing a solid experience for your users and meeting Google’s standards to increase search engine visibility.

Related Article
How to Improve SEO Rankings
Read More

In this post, we’ll introduce you to Google’s Core Web Vitals, explaining why they’re important and how they work. Then, we’ll show you eight ways you can improve them. Let’s jump in!

An Introduction to Core Web Vitals

Google Core Web Vitals are a set of key performance indicators that Google uses to measure the health and vitality of websites:

Google Core Web Vitals - LCP, FID, and CLS

They are page experience signals used to assess your website’s experience, including how fast users can interact with it. For example, site speed is important because a slow-loading page can lower engagement rates and higher bounce rates.

This can harm your website’s ranking in search results and the overall success of your business. The same is true if the page is difficult to navigate.

Why Core Web Vitals Are Important 

Core Web Vitals can help improve your search results. They are important because they help Google understand how well a website is performing and identify areas where it can improve.

More specifically, these metrics consider:

  • Loading
  • Interactivity
  • Visual stability

These are just a few factors that Google considers in its algorithms to measure the health of a website. It also considers mobile-friendliness. This is important because more people are using their mobile devices to access the web. If your website isn’t mobile-friendly, you could be losing out on a lot of traffic and business.

Another key aspect is website security, which helps you protect your site from online threats such as malware and hacking. It helps safeguard both your site content and the data of your users.

By ensuring that your website meets these standards, you can help boost its performance and rank higher in search results. In other words, prioritizing and optimizing Core Web Vitals can help enhance your user experience and SEO. Win-win!

How Core Web Vitals Work

Core Web Vitals are a subset of factors belonging to Google’s Page Experience score; a ranking signal rolled out in 2021. Let’s take a closer look at the three specific measurements that make up Core Web Vitals:

  • Largest Contentful Paint (LCP). This considers how long it takes for your main content to appear to visitors. It measures how quickly the largest elements, such as your images and videos take to load.
  • First Input Delay (FID). This metric analyzes the time it takes for a user’s browser to begin processing event handlers in response to their interaction. In other words, it measures the responsiveness of your web pages when users interact with them for the first time.
  • Cumulative Layout Shift (CLS). This measures how long it takes for your web page to become visually stable. Not all of your site elements load at the same time, and some may move during the loading process. CLS assesses whether there are any elements on the screen that would interrupt or prevent visitors from consuming the content.

A fourth, less-talked-about Vital is First Contentful Paint (FCP). This measures the amount of time it takes for the browser to render the first piece of content (such as an image) on a web page.

How to Measure Core Web Vitals

Before you start working on improving your Core Web Vitals scores, it’s smart to get an idea of where your site currently stands. This way, you’ll be able to measure your progress. Regularly assessing your scores can be a valuable part of your website maintenance.

Let’s look at a few different ways to measure your website’s performance.

PageSpeed Insights

There are a handful of online tools you can use to measure Core Web Vitals, including Pingdom and GTmetrix. However, we recommend using Google PageSpeed Insights:

Google PageSpeed Insights

To get started, you can enter the URL of your website, then click on the Analyze button. When it’s done analyzing your site, the free tool will grade your site’s overall performance. Then it will provide a summary of some of the key data and Core Web Vitals metrics:

mobile performance score

You can find the results under the Metrics section. As a general rule of thumb, you’ll want to aim for the following scores:

  • LCP: 2.5 seconds
  • FID: Less than 100 milliseconds
  • CLS: Less than 0.1 second

Note that you can test both the mobile and desktop version of your website. PageSpeed Insights also lets you analyze individual pages on your site. To do so, you can select the Origin tab.

On the results page, you’ll also find some diagnostics and suggestions for improvements. Based on the score of your site, PageSpeed Insights will provide a handful of recommendations that you can use to increase your score and improve your site’s performance.

Chrome User Experience Report

You can also access your Core Web Vitals through your Chrome User Experience Report. This can be particularly helpful for developers and webmasters.

This report is available through Google Search Console, and provides real data and insights from your visitors. It helps you understand how your users use the web and interact with your site.

To view it, you’ll need to head to your Google Search Console dashboard. Then, navigate to Core Web Vitals, which is located under the Experience section.

Core Web Vitals Chrome Extension

If you’re a Google Chrome user, another helpful tool you can use to assess your Core Web Vitals is the Web Vitals Chrome extension:

Core Web Vitals Chrome Extension

The Web Vitals Chrome extension is a tool that helps you analyze the speed and performance of your website. It provides information on how well your website is performing, including page load time, page size, and requests made. It also offers suggestions on how to improve your website’s performance.

You can use it to test the speed and performance of any website, not just your own. To do this, simply install the extension and open the website you want to test. The extension will automatically start tracking the website’s performance. It will provide results in the form of an easy-to-read report:

Core Web Vitals browser plugin

Within the audit, you’ll be able to automatically view the LCP, CLS, and FID scores. This can be useful if you plan on checking these scores often, as you can execute it without opening another tab.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

How to Improve Core Web Vitals (8 Ways)

Now that we understand what Core Web Vitals are and how they work, it’s time to look at some best practices. Keep in mind that the specific actions you’ll need to take to improve your scores will depend on the results of your test. Therefore, it’s important to also consider the suggestions and recommendations provided by PageSpeed Insights (or other testing tools that you use).

Here are a few effective ways to improve your Core Web Vitals scores.

1. Implement a Caching Solution

Caching your content can help reduce the load on your server. A caching tool stores static HTML versions of your pages, eliminating the need for them to be loaded every time a visitor accesses your site.

Depending on your web host, you may be able to leverage caching on the server level. For example, at DreamHost, we offer server-side caching on some WordPress plans.

However, as a WordPress user, there are also a handful of caching plugins to choose from. One of the most popular options is W3 Total Cache:

W3 Total Cache WordPress plugin

This free WordPress plugin can reduce page load times on your website to boost its performance. It offers caching of pages and posts, CSS and JavaScript, database objects, and much more.

Some additional free plugin options include:

If you’re looking for an all-in-one, powerful caching tool, you might consider WP Rocket:

Implementing a premium caching solution can be particularly helpful for improving your FID score. For example, WP Rocket comes with a feature that lets you easily optimize file delivery. It also includes a handful of other features that can help boost Core Web Vitals scores, which we’ll look at in the following sections.

Related Article
How to Improve SEO Rankings
Read More

2. Eliminate Render-Blocking Resources

Render-blocking elements refer to the static HTML, CSS, and JavaScript files needed to render a page on your site. Each of these files contains scripts that can prevent your users from viewing content. Typically, they’re created from third-party plugins and tools such as Google Analytics.

However, one way you can avoid these scripts from hurting your UX (and in turn, help improve Core Web Vitals) is to eliminate render-blocking resources and minify and remove any unused CSS or scripts.

There are multiple techniques you can use to go about this. One is to minify your JavaScript and CSS by eliminating any white spaces or unnecessary comments.

You can use a tool such as CSS Minifier to make this easier:

CSS Minifier

The tool is free to use. You can simply input your CSS and select the Minify button. Then, you can copy and paste the output to download and replace your code.

Another method is to condense your JavaScript and CSS by combining the files. This is another task that the file optimization feature in WP Rocket can help with.

3. Defer Loading of JavaScript

If you’re looking to boost your FID scores, you can use the technique known as deferring the loading of JavaScript. This is another way to eliminate render-blocking elements.

This process makes your web pages load faster because it delays the loading of JavaScript. In other words, it loads other content on the page once a visitor arrives, rather than waiting for all JavaScript files to finish loading. Your files will be forced to wait to load until everything else on your web page is ready.

Also, you can configure your site settings so that the critical CSS loads ‘above the fold content’ more quickly. ‘Above the fold’ refers to the elements on the web page that appear first.

You can do this by taking the content out of the main CSS file and inlining it into your code. This will help it load faster, thereby improving the UX. Some caching plugins like WP Rocket offer an Optimize CSS Delivery feature that can be helpful for this.

4. Use a Content Delivery Network

A Content Delivery Network (CDN) is a network of servers across the globe that you can use to store your content. This means that your visitors will be served your site content from servers that are in closest proximity to them. This can further help speed up loading times.

Using a CDN can speed up LCP times for your users. It can also help minimize the Time to First Byte (TTFB).

There are several third-party tools that you can leverage for your WordPress site. One of the most popular options is Cloudflare:

Cloudflare

As with caching, some hosting providers offer CDN solutions with their plans. We recommend checking with your web host to evaluate which offerings (if any) come integrated with their plans before implementing one on your own.

5. Properly Size and Optimize Images

Another way to boost LCP scores is to optimize and compress your images to reduce file size. You can do this using a tool such as TinyPNG:

TinyPNG

Image compression tools let you significantly reduce the file size without having to worry about a loss of quality. Additional image optimization plugins to consider using include:

You can also optimize your images by ensuring that they are the appropriate sizes and dimensions. When you upload images from the WordPress editor, the Content Management System (CMS) automatically assigns dimensions for you.

However, if you manually add images via code, it’s important to make sure that you’re defining the dimensions to specify room for these elements. The larger the images, the bigger the file size.

Therefore, it’s smart to ensure that you’re not using unnecessary image dimensions for certain areas on your site. Adding the right attributes can help your browser allocate the appropriate amount of space for your page elements, which can help minimize layout shifts.

You can adjust the image and videos’ width and height size attributes on your website by editing the code. To view these attributes, you can right-click on the image from the front end of your site, then select Inspect. This will bring up the Developer Tools panel. Here, you can see whether the proper sizes are assigned.

Related Article
Common WordPress Image Upload Issues
Read More

6. Implement Lazy Loading

We also recommend that you implement lazy loading. This helps ensure that your images will load exactly when users get to that section of the web page, rather than loading at the same time as everything else on the page.

Lazy loading images can help improve your LCP and loading speed. Many WordPress image optimization plugins, such as Smush, come with lazy loading features built-in.

7. Optimize Your Website Fonts

As with images, the fonts you use on your website can also influence its loading times. This is because they require the browser to download and load the font family, including each variation of its weight combinations.

Optimizing your web fonts can help improve your website’s performance. This is because optimized web fonts are smaller in file size and delivered more quickly.

Also, a browser may not automatically render text elements if the web font associated with it hasn’t loaded yet. On the other hand, using fallback fonts may cause layout shifts, hurting your CLS score.

We recommend being selective in which fonts you choose to use on your site. If you’re using more than two fonts, it’s smart to remove them from the specific elements and use global fonts to only apply the needed types and weights. This will ensure that only the fonts you need for the text are downloaded.

8. Upgrade Your WordPress Hosting

If your site is particularly slow to load, it may indicate that it’s time to upgrade your web hosting. For example, switching from shared hosting to a dedicated server can be an excellent way to improve your LCP.

Your WordPress hosting provider plays a pivotal role in your site’s performance. It affects everything from page speed to security. Therefore, it’s not an area we recommend skimping on, especially if you have a large or complex website. On the contrary, upgrading your hosting provider or plan is one of the quickest yet most powerful ways to optimize your website and improve loading times.

We suggest choosing a managed host that has servers optimized specifically for WordPress and can handle many technical aspects of site performance. For example, at DreamHost, we offer DreamPress plans that are aimed at WordPress site owners looking to get a high-performance site without breaking the bank.

Enhance the User Experience, Reap the Rewards

Continuously improving your user experience is an essential part of maintaining a successful website. And with the help of handy tools and plugins available today, this work can be a lot easier than it would traditionally be.

However, if you need a bit more developer power, our team here at DreamHost has the expertise you need to ensure your Core Web Vitals improvements and other development projects are done right.

Ad background image

You Dream It, We Code It

Tap into 20+ years of coding expertise when you sign up for Web Development services. Just let us know what you want, and we’ll code it. Core Web Vitals and all.

Learn More

The post How to Improve Core Web Vitals (8 Ways) appeared first on Website Guides, Tips & Knowledge.

]]>