Wednesday, January 6, 2021

How to Add Keywords and Meta Descriptions in WordPress

Do you want to properly add keywords and meta descriptions in WordPress?

Meta keywords and descriptions allow you to improve your website’s SEO ranking. This means more traffic, leads, and sales for your business.

In this article, we will show you how to easily add keywords and meta descriptions in WordPress.

Adding meta keywords and meta descriptions in WordPress

Why Add Keywords and Meta Descriptions in WordPress?

Keywords and descriptions allow you to tell search engines more about the content of your posts and pages.

Keywords are important words or phrases that people are likely to search to find your content. A meta description is a brief description of what your page or post is about.

It’s your meta title, description, and keywords that shows up in Google search results:

Google Search Listing

Meta keywords and meta description are HTML meta tags. They form part of your website’s header code. They don’t appear on your page or post for visitors to see. However, search engines and browsers can use them.

WordPress SEO plugins make it super easy for you to add them from your WordPress admin area for each post and page on your website.

How Important are Meta Keywords and Meta Descriptions for SEO?

Like most WordPress users, you are probably wondering will adding meta keywords and meta descriptions will improve my WordPress SEO rankings.

While search engines don’t exactly share how much weight they assign to keywords or description, SEO experts always recommend adding proper meta description and keywords for on-page SEO optimization.

Meta descriptions are widely used by search engines. In Google’s search results, they appear below your content’s title, with the search term shown in bold.

An example meta description, for the All in One SEO plugin homepage

An effective meta description will encourage users to click through and read your content. And what we do know is that a good click through rate means Google will likely rank your content higher.

Now when it comes to meta keywords, most modern search engines either assign very little importance or don’t use them at all. The main exception is the Russian search engine Yandex.

Instead search engines prefer that you add your focused keywords in your title, description, and through out your content. This is why SEO plugins like AIOSEO comes with a TruSEO score that helps you optimize your content for focused keywords and keyphrases.

Our Recommendations for Meta Keywords and Meta Descriptions

We recommend adding a meta description for all the posts and pages on your site, including your homepage, category pages, and tag pages.

Note: Google customizes the description based on the search query, so it will only use your meta description some of the time. However, it’s still worth creating a meta description. It will appear for around 30% of users, and it can help your SEO.

When it comes to meta keywords, it’s up to you whether or not to use them. They will not harm your site, but they may not have much benefit either.

Having said that, let’s take a look at how to easily add keywords and meta descriptions in WordPress.

How to Add Meta Description and Keywords in WordPress (Video Tutorial)

If you prefer the written tutorial, then please continue reading.

Installing and Activating All in One SEO for WordPress

For this tutorial, we will be using All in One SEO (AIOSEO) which is the best WordPress SEO plugin on the market. It allows you to easily optimize your entire WordPress site for better SEO and comes with comprehensive set of tools to grow your business.

First, you’ll need to install and activate the All in One SEO plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, All in One SEO will take you through a simple setup wizard. Just follow the step by step instructions to get everything set up for your site.

After completing the setup, simply click the ‘Finish Setup and Go to the Dashboard’ button.

Click the Finish Setup button to go to your dashboard

Enable Meta Keywords Support in All in One SEO

All in One SEO comes with built-in support for meta description and keywords. However, the meta keywords feature is turned off by default. This is because many search engines give little or no importance to keywords in their rankings.

To enable it, go to All in One SEO » Search Appearance » Advanced in your WordPress dashboard. Then, switch the meta keywords toggle from No to Yes.

Turning on the meta keywords option in All in One SEO

After enabling meta keywords in WordPress, you will see some additional options. You can generate a post’s keywords from its categories and/or tags. Also, you can dynamically generate keywords on your blog posts and archive pages.

It’s up to you whether you want to use these automated options or not. Regardless, you will always be able manually define keywords for each post and page.

The meta keyword options that are available in All in One SEO

Don’t forget to click the ‘Save Changes’ button at the bottom of the page after making changes.

Adding Meta Descriptions and Meta Keywords to Your WordPress Posts and Pages

First, you need to edit a post or page where you want to add your meta keywords and meta description.

AIOSEO works on both WordPress block editor (Gutenberg) and WordPress classic editor.

Once on the content editor screen, scroll down to the ‘AIOSEO Settings’ box below the content area.

Adding a Meta Description to Your Post or Page Using AIOSEO

You will see your site’s title and an automatically generated description as the snippet. Below that, you’ll see the Meta Description field.

The automatically generated snippet in All in One SEO

Go ahead and enter a description into your Meta Description field. All in One SEO will let you know how many characters you’ve used. This is important because Google will only show 160 characters in the search results.

You’ll see that your snippet preview automatically updates as you type your meta description.

Entering your meta description in All in One SEO

Once you’ve finished, simply save or publish your post to save the changes to your meta description.

Using All in One SEO’s Dynamic Tags in Your Meta Descriptions

Optionally, you can add tags to your meta description. The ones that All in One SEO offers by default are Page Content and Separator, but you can add other dynamic tags as well.

For example, we’ve added the author’s name to our meta description here.

A meta description with the tags Author First Name and Author Last Name at the start

To add a tag, simply type the # character into the meta description box. You’ll then see a dropdown menu of available tags.

Adding tags to your meta description in All in One SEO

Adding Meta Keywords to Your Post or Page Using AIOSEO

To add your meta keywords, you need to click the Advanced tab for your AIOSEO settings.

Simply type in your keywords, and press Enter after each one. It’s important to only use keywords that are relevant to your content. Adding irrelevant keywords will not give you any SEO benefits.

Adding meta keywords for your post or page using All in One SEO

Tip: Meta keywords are completely separate from your Focus Keyword. You can set a Focus Keyword under the General tab. This is for All in One SEO to give you recommendations about improving your content. The Focus Keyword doesn’t automatically become a meta keyword for your post or page.

Adding Meta Keywords and Meta Description for Your Homepage

You can also add meta keywords and a meta description for your website’s homepage in WordPress. Here is how to do that using All in One SEO.

First, go to Search Appearance » Global Settings in your WordPress admin. Then, scroll down to the Home Page section.

The Home Page section in your Search Appearance settings for All in One SEO

On this screen, you can easily enter a meta description and keywords, just like you would for a post or page.

All in One SEO will use your tagline as your meta description by default. You can leave that in there or you can customize it.

Entering a meta description and keywords for your homepage

You can also click on the other options to add those tags into your meta description. Alternatively, you can add different tags by typing the # character in your meta description, as described above.

Tip: It’s better to use these tags rather than manually typing your site title, tagline, or separator character. This is because your meta description will automatically be updated if you later make changes to any of those.

Make sure you click the Save Changes button at the bottom of the page after adding your meta description and keywords.

Meta Keywords and Description for WordPress Category Archives

You can also add keywords and description to your category and tag archive pages.

First, you need to visit the Posts » Categories page. Take your mouse over to the category you want to edit and then click on the ‘Edit’ link.

Editing a category in WordPress

Scroll down on the category’s page to the AIOSEO Settings box. Here, you just need to enter a meta description for your category. Again, you can use All in One SEO’s tags within this if you want to.

Adding a meta description for your category in All in One SEO

To add keywords, simply click on the Advanced tab like you would for any post or page.

Make sure you save the changes to your category before moving on.

Your meta description and keywords will now be used for the category page, which is the archive of posts in that category.

You can repeat the process to add meta keywords and descriptions to your blog’s tags and other custom taxonomy archive pages.

All in One SEO integrates seamlessly with other popular WordPress plugins. This allows you to add keywords and meta description for your WooCommerce product pages, SeedProd landing pages, MemberPress course pages, and more.

We hope this article helped you learn how to easily add keywords and meta description to your WordPress posts and pages. You may also want to see our step by step guide on how to create an email newsletter to grow your website traffic, and our comparison of the best WordPress contact form plugins.

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

The post How to Add Keywords and Meta Descriptions in WordPress appeared first on WPBeginner.


January 06, 2021 at 06:00PM

Tuesday, January 5, 2021

How to fix cURL error 28: Connection timed out after X milliseconds

Are you seeing the cURL error 28: Connection timed out error on your WordPress site?

The cURL error 28 is a common WordPress REST API issue that can affect your website’s performance and may cause it to behave unpredictably.

In this article, we will show you how to easily fix the ‘cURL error 28: Connection timed out’ issue on your WordPress website.

Fixing the cURL error 28: Connection timed out issue in WordPress

What is cURL in WordPress?

The cURL is a software utility used by WordPress and many other web applications to send and receive data requests using URLs.

WordPress uses cURL to handle several API requests. It is available as an extension of the PHP programming language, and your WordPress hosting company takes care of that.

The cURL library plays a crucial role in how WordPress works behind the scenes. If it is not configured properly, then your WordPress website will not function properly.

What Causes cURL error 28 in WordPress?

Failure to respond back to the server’s data requests in a timely manner causes cURL error 28 in WordPress.

WordPress uses REST API (a programming technique) to send and receive data requests. If these requests time out, then you’ll see it as a critical issue in the Site Health report with the title ‘The REST API encountered in error’.

cURL error 28 shown in WordPress site health report

Expanding the error will show you further details including the error message:

Error: cURL error 28: Operation timed out after x milliseconds with x bytes received (http_request_failed)

You may also see another related issue with the title ‘Your site could not complete a loopback request’. It will have a similar error message with the following description.

‘The loopback request to your site failed, this means features relying on them are not currently working as expected.’

What may cause cURL to timeout?

A number of scenarios may cause the cURL to time out in WordPress.

For instance, a WordPress firewall plugin may block a REST API request considering it to be a suspicious activity.

If your DNS server is not working correctly, then this may also fail HTTP requests and cause the cURL timeout error in WordPress.

A poorly configured WordPress hosting server may simply have a very low timeout threshold which may stop certain WordPress processes to run properly.

That being said, let’s take a look at how to troubleshoot and fix the ‘curl error 28: Connection timed out’ issue in WordPress.

1. Temporarily Disable WordPress Firewall

If you are using a WordPress firewall or a security plugin, then go ahead and temporarily deactivate it.

Deactivate WordPress firewall plugin

After that, you need to visit the WordPress site health report page to see if your issue has resolved.

If it has, then you need to check your WordPress firewall logs to see which API requests have been blocked.

This would either identify the source of the issue or you can adjust firewall settings to not block legitimate API requests.

2. Deactivate All WordPress Plugins

WordPress plugins make their own API requests to send and receive data. If these calls are too frequent or take too long to complete, then this may cause the cURL error in your site health report.

The easiest way to figure this out is by deactivating all WordPress plugins. Simply go to the Plugins » Installed Plugins page and select all plugins.

Deactivate all WordPress plugins

After that, click on the Bulk Actions drop down to select ‘Deactivate’ and then click on the ‘Apply’ button.

You can now visit the Site Health report to see if the issue has disappeared. If this resolved the issue, then you can start activating your plugins one by one until the issue reappears.

This will help you find the plugin that may be causing the issue and you can then ask the plugin author for support.

3. Ensure Your Hosting Server is Using the Latest Software

The next, step is to make sure that your WordPress hosting server is using the latest versions of PHP, cURL library, and OpenSSL.

You can check that by looking at the system information tab under Tools » Site Health page.

System information report under site health

Simply switch to the ‘Info’ tab and expand the ‘Server’ section. From here you can get the information about software installed on your WordPress hosting server.

Check PHP, cURL, and OpenSSL versions

Ideally, your server should be using PHP 7.4.13 or higher, curl 7.74.0 or higher, and OpenSSL 1.1.1 or higher.

If it doesn’t, then you need to contact your WordPress hosting company and request them to update the software for your hosting account.

4. Fix SSL Insecure Content Issues

If your WordPress site is using HTTPS / SSL, but it is not configured properly, then this could also lead your web server to block insecure cURL requests.

Similarly, if your WordPress site doesn’t use HTTPS / SSL, but it made an API call using an HTTPs URL, then those requests will fail too, and you may see the following cURL error instead:

‘Error: cURL error 7: Failed to connect to localhost port 443: Connection refused (http_request_failed)

cURL error 7 in WordPress

To fix this, you can ask your hosting provider to re-install SSL certificate for your website. If the issue persists, then follow our guide on how to fix common SSL issues to properly set up SSL on your WordPress website.

5. Seek Help from Hosting Provider

If the above steps fail to resolve the cURL error 28 on your WordPress site, then the problem is most likely a hosting environment issue.

There are many factors that can only be controlled and fixed by your hosting company. For instance, if their DNS servers are unable to resolve requests in a timely manner, then this will cause cURL requests to timeout.

Another scenario could be slower connectivity or networking issues with your hosting server.

Simply drop them a support request with the error details and their technical staff can troubleshoot and apply a fix to solve it.

We hope this article helped you learn how to fix the cURL error 28 in WordPress. You may also want to bookmark our WordPress troubleshooting tips and our ultimate handbook on fixing common WordPress errors.

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

The post How to fix cURL error 28: Connection timed out after X milliseconds appeared first on WPBeginner.


January 05, 2021 at 06:00PM

Monday, January 4, 2021

How to Highlight Text in WordPress (Beginner’s Guide)

Do you want to highlight text in a WordPress post or page?

Being able to highlight text can help you point user’s attention to a specific text area. This can be great to highlight a call to action, special offer, or simply add emphasis on specific sentences.

In this article, we’ll show you how to easily highlight text in WordPress both with or without a plugin.

Highlighting text in WordPress

Why and When to Highlight Text

Text highlighting is an easy way to emphasize important information in your content. This helps you direct user’s attention to important calls to action.

Here’s a sample of what text highlighting can look like:

Example of highlighted text

By default, the WordPress content editor does not come with the option to simply select and highlight any text. You can still emphasize text by making it italic, change text color, or making it bold.

Default paragraph toolbar in WordPress block editor

That being said, let’s take a look at how to easily highlight text in WordPress.

Method 1. Highlight any Text in WordPress (No HTML Required)

The easiest way to highlight text is by using a WordPress plugin.

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

Advanced Editor Tools (formerly known as TinyMCE Advanced) adds more formatting options and extends the WordPress block editor.

Once the plugin is activated, you can edit the WordPress post or page where you want to highlight some text. Simply select the text you want to modify and then click on the dropdown arrow for more formatting options.

Highlighting text in WordPress using Advanced Editor Tools plugin

From the drop-down menu, you need to select the ‘Mark’ option. This will highlight the text using the default colors.

However, the actual color may vary depending on your WordPress theme colors. You can now save your post/page and preview it to see the highlighted text in action.

Example of highlighted text

Easy wasn’t it?

However, if you don’t need to highlight text very often, then this next method allows you to do the same without using a plugin.

Method 2. Manually Highlight Text in WordPress

This option requires a little bit of code, but it’s easy to implement.

For this example, we’ll be using the HTML ‘mark’ element. This can be used to highlight and bring attention to a certain part of your writing.

Simply edit the post or page where you want to highlight the text. Next, go to the paragraph containing the text and then click on three-dot menu in the block toolbar. From here, you need to select ‘Edit as HTML’ option.

Editing a block as HTML

Next, you’ll see raw text in HTML format. Simply wrap the text you want to highlight inside the <mark> and </mark> tags like this:

<mark>highlighted text</mark>

You can now switch back to the visual mode by clicking on the three-dot menu again and selecting ‘Edit Visually’ in the block toolbar.

Edit visually

The block area will switch back to the visual mode, and you’ll notice your selected text highlighted.

Highlighted text in the editor

Your highlighted text may look different depending on your WordPress theme. However, normally it is just a yellow background.

If you would like to change it, then you can do so by adding your own custom CSS.

Simply go to Appearance » Customize page to launch the theme customizer. From here, you need to switch to the ‘Additional CSS’ tab.

Custom CSS settings

Here you can paste your custom CSS. You can use the following CSS code as a starting point.

mark {
background-color: #ffd4a1;
}

Once you’re done, hit the ‘Publish’ button to save your changes. You can now visit your WordPress blog to see your highlighted text in action.

Custom CSS to change background color of highlighted text

We hope this helped you learn how to highlight text in WordPress. You may also want to see our guide on the best WordPress page builders to help you create completely custom designs without any code, and our comparison of the best email marketing services to grow your traffic.

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

The post How to Highlight Text in WordPress (Beginner’s Guide) appeared first on WPBeginner.


January 04, 2021 at 05:03PM