Learning how to add meta keywords in WordPress without plugin tools is straightforward once you know where the code goes. WordPress does not include a built-in field for meta keywords, so you need to add a small snippet of code yourself, either through your theme files or through a custom code field your theme already provides.
Before you start, though, there is something you should know. Google has not used the meta keywords tag for ranking since 2009, and the major search engines largely ignore it today. That does not mean the tag is completely useless, but it does mean you should not expect it to improve your position in Google search results. This guide shows you the honest picture: what the tag does, why some site owners still add it, the three safe ways to add it without a plugin, and what to focus on instead if real search visibility is your goal.

What Are Meta Keywords in WordPress?
A meta keywords tag is a short line of HTML placed in the head section of a web page. It lists a handful of words or phrases that describe what the page is about. A typical tag looks like this:
<meta name="keywords" content="wordpress seo, meta keywords, on-page seo">
In the early days of search, engines read this tag to understand a page’s topic. Site owners quickly learned to stuff it with popular search terms, even ones that had nothing to do with the page. The abuse became so widespread that Google announced in 2009 that it no longer used the tag for ranking at all, and other major engines followed a similar path.
WordPress itself has never shipped with a meta keywords field. Themes and SEO plugins add one, but a plain WordPress install gives you no place to type keywords for a page. That is why owners who want the tag either install a plugin or add a few lines of code by hand. Doing it by hand is not hard, and it keeps your site lighter than adding yet another plugin for a single small job.
Why Some Site Owners Still Add Meta Keywords
If Google ignores the tag, why bother? There are a few honest reasons, and none of them involve ranking higher on Google.
Some smaller or specialist search engines still read meta keywords, and a few internal site search tools and content management systems use the tag to categorise pages. A handful of directories and aggregators also pick it up when they index a site. For a small business site or a niche blog, these are minor benefits, but they cost almost nothing to gain.
Other owners add the tag for their own organisation. A consistent set of keywords across pages acts as a simple labelling system, making it easier to review what each page is meant to cover. It can also help when handing a site over to a new developer or content writer, since the tag records the intended topic of each page in the code itself.
The key point is to keep expectations realistic. The tag is a small piece of page metadata, not an SEO strategy. If you add it, do so knowing it is a finishing touch, and put most of your effort into the things that genuinely move rankings: useful content, a clear title tag, and a well-written meta description.
Before You Start: Back Up and Use a Child Theme
Adding meta keywords without a plugin means editing theme files, so take two precautions first. Both take a few minutes and protect you from a broken site.
First, make a full backup of your site, including the database. If anything goes wrong while you edit code, a backup lets you restore the site in minutes. Most hosts offer a one-click backup, and several free backup plugins can do the same job.
Second, never edit your main theme directly. When the theme updates, your edits are wiped out. Instead, work in a child theme, which inherits everything from the parent theme but keeps your changes safe across updates. If your theme does not already have a child theme, create one before you go any further. Many hosts and theme developers provide a simple child theme generator, and the WordPress theme handbook explains the file structure.
Finally, keep a copy of the original file you are about to change. If a code edit produces an error, you can restore the original in seconds rather than trying to remember what you changed.
Method 1: Add Meta Keywords With functions.php and the wp_head Hook
This is the cleanest method for most site owners. It adds the tag through the wp_head hook, which WordPress runs when it builds the head section of every page. You add one small function, and WordPress does the rest.
Here are the steps:
- In your WordPress dashboard, go to Appearance, then Theme File Editor, and open the functions.php file of your child theme.
- Scroll to the bottom of the file and paste in the code below. Replace the sample keywords with ones that describe your site.
- Click Update File to save your changes.
- Open your homepage in a browser, right-click the page, and choose View Page Source. Search for “keywords” and check that your new tag is present.
- If the tag is missing, clear any caching plugin and check again.
function howlly_add_meta_keywords() {
echo '<meta name="keywords" content="wordpress seo, meta keywords, on-page seo">' . "\n";
}
add_action( 'wp_head', 'howlly_add_meta_keywords' );
This snippet adds the same set of keywords to every page on your site. That is fine for a small site with a single clear topic, but it is not ideal for a larger site where each page covers something different. For page-specific keywords, you can extend the function with a conditional check, so different pages output different tags:
function howlly_add_meta_keywords() {
if ( is_page( 'about' ) ) {
echo '<meta name="keywords" content="about us, our team, company story">' . "\n";
} elseif ( is_single() ) {
echo '<meta name="keywords" content="wordpress seo, meta keywords, on-page seo">' . "\n";
}
}
add_action( 'wp_head', 'howlly_add_meta_keywords' );
Keep each list short. Five to ten relevant phrases per page is plenty. Longer lists look spammy, and no search engine rewards them. If you are unsure which phrases to use, pick the terms a visitor would naturally use to describe the page, not the terms with the highest search volume.
One common mistake is to paste this code into the parent theme’s functions.php file. It will work, but the next theme update will erase it. Always use the child theme. If your dashboard does not show the Theme File Editor, your host may have disabled file editing for security. In that case, edit the file through your hosting file manager or an FTP client instead.

Method 2: Add the Tag Directly in header.php
If you prefer to see exactly where the tag sits in your page, you can add it directly to the header.php file of your child theme. This method gives you full control over placement, and it is easy to understand even if you are new to code.
Here are the steps:
- Copy the header.php file from your parent theme into your child theme folder, keeping the same file name.
- Open the child theme copy in the Theme File Editor or your hosting file manager.
- Find the closing
</head>tag near the top of the file. - Paste your meta keywords tag on the line just before
</head>, like this:
<meta name="keywords" content="wordpress seo, meta keywords, on-page seo">
</head>
- Save the file and check your site’s page source to confirm the tag appears.
- Visit a few different pages to make sure the site still loads normally.
The advantage of this method is visibility: you can see the tag sitting in the head section alongside the title and description tags. The drawback is the same as with any direct file edit. If the parent theme changes its header.php structure in an update, your child theme copy may fall behind, and you may miss new features the parent theme adds to the header. Check your child theme header after major theme updates to make sure it still matches.
Whichever method you choose, do not use both at once. Adding the same tag through functions.php and header.php will produce two identical meta keywords tags on every page, which looks careless and can confuse the few tools that still read the tag.
Method 3: Use Your Theme’s Built-In Custom Code or Header Field
Many modern WordPress themes include a built-in field for custom code in the header, often labelled “Custom Code”, “Header Scripts”, or “Additional Code”. This is the easiest method of all, because it needs no file editing.
Here are the steps:
- In your dashboard, go to Appearance, then Customise, and look for a section called Header, Code, or Additional CSS and Scripts. The exact name varies by theme.
- If your theme has no such section, check the theme options page under Appearance or Settings.
- Paste your meta keywords tag into the header code field.
- Save and publish your changes.
- Check your page source to confirm the tag is live.
This method keeps your code separate from theme files, so theme updates will not remove it. It also avoids the risk of a typo breaking your site, since the code field does not run PHP. The trade-off is that the field only accepts plain HTML, so you cannot use conditional logic to show different keywords on different pages. For a small site with one topic, that limitation rarely matters.
If your theme has no custom code field, check whether your host or theme offers a code snippets plugin alternative. A lightweight code snippets tool lets you add the same wp_head function from Method 1 without editing files directly, and it keeps your snippets safe when you switch themes. That is still a plugin, strictly speaking, but it is a general code tool rather than a dedicated SEO plugin, and many developers prefer it to editing files by hand.
For a broader look at how plugins fit into WordPress SEO, see our guide to WordPress SEO optimisation with a plugin, which explains when a plugin earns its place and when hand-written code is the better choice.
How to Check the Meta Keywords Tag Is Present
After adding the tag by any method, verify it actually appears on the live page. Code that sits in a file but never reaches the browser does nothing.
The simplest check is View Page Source. Open any page on your site, right-click, and choose View Page Source. Use your browser’s find function (Ctrl+F or Cmd+F) and search for “keywords”. You should see your tag in the head section, near the top of the document. If it is not there, check the following:
- Did you save the file or publish the customiser changes?
- Did you edit the child theme, or did you accidentally edit the parent theme while a child theme is active?
- Is a caching plugin serving an old copy of the page? Clear the cache and try again.
- Did you add the code through both functions.php and header.php? A duplicate tag is easy to miss, and a syntax error in one place can stop the other from running.
Online meta tag checker tools can also confirm the tag, but View Page Source is enough and needs no third-party service. Check a few different page types — the homepage, a blog post, and a static page — especially if you used conditional code that should show different keywords on different pages.

Common Mistakes to Avoid
Most problems with meta keywords come from small errors that are easy to prevent.
The first is keyword stuffing. Listing thirty keywords, repeating the same phrase, or adding terms that have nothing to do with the page is the exact behaviour that caused search engines to abandon the tag. Keep the list short, relevant, and honest.
The second is editing the wrong file. WordPress themes often have several files with similar names, and editing the parent theme instead of the child theme is a common slip. Always confirm which theme is active and which file you have open before you save.
The third is a syntax error in PHP. A missing semicolon or an unmatched bracket in functions.php can take down your whole site with a white screen. That is why the backup matters, and why you should paste code carefully rather than typing it from memory. If your site goes blank after an edit, restore the original functions.php through your hosting file manager and the site will come back.
The fourth is expecting results the tag cannot deliver. If you add meta keywords and your rankings do not move, that is normal, not a sign that you did something wrong. Google stopped using the tag for ranking in 2009, so no amount of keyword tweaking in this tag will change your Google position. Judge the tag on what it actually does, and put your SEO effort where it counts.
Finally, do not add meta keywords to pages you want to keep out of search results. If a page should not be indexed, use a noindex tag or your privacy settings instead. Meta keywords have no effect on whether a page is indexed.
What to Do Instead for Real SEO
If your goal is better visibility in search, the meta keywords tag is the wrong place to spend your time. These are the elements that genuinely matter, and every one of them is within your control without a plugin.
Start with the title tag. Every page needs a unique, descriptive title that puts its main topic near the start and reads naturally to a human. The title is one of the strongest on-page signals search engines still use, and it is also what people see in search results. Keep it focused on one topic per page.
Next, write a proper meta description for each important page. The description does not directly affect rankings either, but it shapes whether people click your result. A clear description of 140 to 160 characters, with the page’s main topic mentioned naturally and a reason to click, can lift your click-through rate noticeably. You can add a meta description by hand with the same wp_head approach used above, or through your theme’s fields if it provides them.
Then look at the content itself. A page that answers a real question, in clear language, with useful headings and short paragraphs, will outperform a thin page with a perfect meta tag every time. Use descriptive headings that include related terms naturally, structure how-to content as numbered steps, and link to your other relevant pages with anchor text that tells the reader what they will find. Our guide to WordPress SEO services explains how these pieces fit together when you want a full-site review rather than a single fix.
Site structure matters too. Make sure your pages load quickly, work well on a phone, and are easy to reach from your main navigation. A fast, mobile-friendly site with clear internal links helps both visitors and search engines, and it is far more valuable than any single meta tag. If you are still choosing how to build your site, our comparison of website building platforms covers the trade-offs between WordPress and the main alternatives.
And if something breaks while you are working on your site, do not panic. Our guide to fixing a plugin not working in WordPress walks through the same safe troubleshooting steps — back up, disable the suspect change, and test one thing at a time — that apply to theme code edits as well.
FAQ
Does Google use meta keywords for ranking?
No. Google announced in 2009 that it does not use the meta keywords tag for ranking, and that position has not changed. Adding keywords to this tag will not improve your Google rankings, and stuffing it with popular terms will not help either. Focus on your title tag, meta description, and content quality instead.
Can I add meta keywords to individual pages without a plugin?
Yes. The functions.php method in this guide can be extended with conditional checks, such as is_page() or is_single(), so different pages output different keyword tags. The header.php method and the theme custom code field both apply the same tag to every page, so use the functions.php approach when you need page-specific keywords.
Is it safe to edit functions.php in WordPress?
It is safe if you take two precautions: work in a child theme so updates do not erase your code, and back up your site first. A syntax error in functions.php can cause a white screen, but restoring the original file through your hosting file manager fixes it. If you are not comfortable editing PHP, use your theme’s custom code field instead.
Should I use a plugin for meta keywords instead?
A plugin is the easier route if you want different keywords on every page without writing code, and a good SEO plugin handles titles and descriptions as well. The manual methods in this guide suit owners who want to keep their plugin count low or who only need a simple site-wide tag. Either approach works — choose the one you can maintain confidently.

