If you want to know how to add meta keywords in WordPress without plugin installs slowing down your site, you are in the right place. This guide walks you through two manual methods that take a few minutes and require no extra software. You will edit one small file, add a short piece of code, and confirm it works. No fluff, no filler, just a clear process you can follow today.
What Are Meta Keywords and Do They Still Matter?
The meta keywords tag is a short line of HTML code that sits inside the head section of a webpage. It lists a handful of words or phrases that describe what the page is about. Site owners used to fill this tag with their target keywords, hoping search engines would rank pages higher because of it.

That practice worked for a while, back in the early 2000s. Then site owners started stuffing the tag with every keyword they could think of, even ones that had nothing to do with the page. Search engines noticed the abuse and stopped trusting the tag.
Google confirmed in 2009 that it does not use the meta keywords tag as a ranking factor. Bing has said the same thing. So if your goal is to rank higher in Google search results, this tag will not move the needle on its own.
Here is where it still has a small purpose:
- Some internal site search plugins read the meta keywords tag to improve on-site search results
- A few smaller or regional search engines still give it minor weight
- Some content management systems and syndication tools pull data from this tag for categorization
- It can serve as a private content-tagging system for your own editorial team
If none of those apply to your site, you can skip this tag entirely and spend your time on things that actually help your rankings, like solid title tags and clear headings. But if you have a specific reason to add it, the rest of this guide shows you exactly how.
Why Skip a Plugin for Something This Small?
Plugins are convenient, but they come with a cost. Every plugin you install adds extra files, extra database queries, and one more thing that needs updates. A plugin built just to add meta keywords is asking a lot from your site for something this minor.
Think about it this way. If your only goal is to add one small line of code to your page header, installing a full plugin to do that job is like buying a toolbox to hammer in a single nail. A short custom code snippet gets the same result in seconds, with nothing extra running in the background.
Sites Already Running an SEO Plugin
Many WordPress sites already use Yoast SEO, Rank Math, or All in One SEO. These plugins removed their meta keywords fields years ago because Google stopped supporting the tag. So if you are already using one of these tools and still want the meta keywords tag on your pages for a specific internal reason, a second plugin is not the answer. A short manual code addition solves the problem without any conflict.
What You Need Before You Start
Before you touch any code, gather a few basics.
- Access to your theme files. You can reach these through your WordPress dashboard’s built-in theme editor, through cPanel File Manager, or through an FTP client like FileZilla.
- A code editor or the WordPress theme editor. Either works fine for a small edit like this.
- A full backup of your site. This step matters more than people expect. Editing theme files by hand carries a small risk, and a backup means you can undo any mistake in minutes instead of hours.
- A child theme, if possible. This protects your changes from being wiped out the next time your theme updates.
Once you have these ready, you can move on to the actual edit.
Method 1: Add Meta Keywords in WordPress Without Plugin Tools, Using functions.php

This is the method most developers recommend because it keeps your changes centralized and easy to manage.
Step 1: Locate functions.php in Your Active Theme
From your WordPress dashboard, go to Appearance > Theme File Editor. On the right side, look for a file called functions.php and click to open it. If you prefer FTP or File Manager, this file usually sits inside wp-content/themes/your-theme-name/.
Step 2: Add the Custom Function
Scroll to the bottom of the file and paste in this code:
function add_meta_keywords_tag() {
if ( is_singular() ) {
echo '<meta name="keywords" content="your, target, keywords, here" />' . "\n";
}
}
add_action( 'wp_head', 'add_meta_keywords_tag' );
Here is what each part does, in plain terms:
- The function named add_meta_keywords_tag holds the code that prints the tag
- The check for is_singular() means the tag only shows up on individual posts and pages, not on archive or category listings
- The echo line prints the actual meta keywords tag with placeholder text you need to replace
- The add_action line hooks your function into wp_head, which is the section WordPress uses to build the page head
Replace “your, target, keywords, here” with the actual words that describe your content. Keep it to five or six relevant terms. Long lists of unrelated words do not help you and can look spammy to anyone who views your page source.
Step 3: Test the Output
Save the file, then visit any post or page on your site. Right-click and choose View Page Source, or press Ctrl+U on most browsers. Search the page for the word “keywords” using Ctrl+F. You should see your new meta tag sitting inside the head section.
Common Mistakes at This Step
A few small errors trip people up here.
- Missing a semicolon after a line of code, which breaks the whole function and can cause a blank white screen on your site
- Editing the parent theme instead of a child theme, which means your changes disappear the next time the theme updates
- Placing the code outside the PHP tags, which causes the raw code to print on your live pages instead of running properly
- Using the wrong hook name, which stops the tag from appearing in the head section at all
If your site shows a white screen after saving, do not panic. Go back into File Manager or FTP, open functions.php, and remove the code you just added. This restores your site immediately while you figure out what went wrong.
Method 2: Add Meta Keywords Directly in header.php

This method places the tag straight into your theme’s header file instead of using a function.
Step 1: Find header.php
Inside the Theme File Editor, or through FTP, locate header.php in your active theme’s folder.
Step 2: Insert the Tag
Look for the closing </head> tag near the top of the file. Just above that line, add:
<meta name="keywords" content="your, target, keywords, here" />
Step 3: Save and Verify
Save your changes and check the page source the same way you did with Method 1. The tag should now show up on every page that uses this header file, which usually means your entire site.
Why This Method Carries More Risk
Editing header.php directly works, but it comes with a downside. If your theme releases an update, this file often gets overwritten, and your edit disappears without warning. A child theme solves this problem because WordPress checks the child theme’s files first, leaving your original theme untouched.
Method 3: Add Page-Specific Meta Keywords With Custom Fields
Sometimes a single site-wide tag is not precise enough. You might want different keywords on different pages.
Setting Up a Custom Field
Open any post or page in the WordPress editor. Scroll down to the Custom Fields panel, which may need to be enabled through the Screen Options menu at the top of the editor. Add a new custom field named meta_keywords, and type your keywords into the value box.
Pulling the Value Into Your Header
Back in functions.php, update your code to pull this custom field instead of a fixed list:
function add_meta_keywords_tag() {
if ( is_singular() ) {
$keywords = get_post_meta( get_the_ID(), 'meta_keywords', true );
if ( $keywords ) {
echo '<meta name="keywords" content="' . esc_attr( $keywords ) . '" />' . "\n";
}
}
}
add_action( 'wp_head', 'add_meta_keywords_tag' );
Now every post can carry its own set of keywords, pulled straight from a field you fill in while writing. This approach takes a little more setup, but it gives you far more control than one tag repeated across your whole site.
Using a Child Theme to Protect Your Changes
A child theme is a small companion theme that inherits everything from your main theme but keeps your custom code separate. Editing a parent theme directly is risky because any future update wipes your changes clean.
Setting one up takes about ten minutes. Create a new folder inside wp-content/themes/, add a style.css file that references your parent theme, and add your own functions.php inside that folder. Once activated from your dashboard, this child theme becomes the safe place for every custom code snippet you add going forward, including the meta keywords tag from this guide.
How to Verify Your Meta Keywords Tag Is Working
Checking your work only takes a minute, and it saves you from wondering if the code actually did anything.
- Open any page on your site and view the page source
- Search for the word “keywords” to jump straight to the tag
- Confirm the words inside the content attribute match what you typed
- Check a second and third page to confirm the tag shows up consistently
If you used View Page Source and cannot find the tag, try Inspect Element instead. Some caching plugins serve a stored version of your page, and clearing the cache often fixes the issue.
Should You Even Use Meta Keywords in 2026?
This is worth asking honestly before you spend time on any of the steps above.
Search engines today rely on far more advanced signals than a single tag. Google looks at search intent, content depth, page experience, structured data, and dozens of other factors. A meta keywords tag plays no role in any of that process.
Here is a fair way to look at it: adding this tag carries low risk and low effort, but it also brings low reward. It will not hurt your rankings, and in most cases, it will not help them either.
If you have a small amount of time and want the highest return on your SEO effort, put it into your title tags, your meta descriptions, your header structure, and the internal links between your pages. Those elements carry real weight with search engines today. The meta keywords tag, by contrast, mostly serves internal organization or a legacy system that still checks for it.
Troubleshooting Common Issues
Even a small code change can hit a snag. Here are the problems people run into most often.
The tag does not show up in page source. Clear your caching plugin, then check again. Confirm the code sits inside the correct PHP tags in functions.php.
The tag appears more than once on the same page. This usually means the function got added twice, either in functions.php and header.php at the same time. Remove one instance and keep the other.
The change disappears after a theme update. This confirms you edited the parent theme directly. Move your code into a child theme so future updates leave it alone.
FAQ Section
Do meta keywords still affect Google rankings in 2026? No, Google confirmed years ago that it does not use this tag as a ranking signal, and that has not changed.
Can I add meta keywords without editing any code at all? Not through a fully manual, plugin-free method. Some page builders offer a custom code field in their settings panel, which counts as a lighter version of the same process.
Will adding meta keywords manually break my WordPress site? It carries a small risk if you make a typo in the code, but a quick backup before you start protects you completely.
What is the difference between meta keywords and meta descriptions? Meta keywords list a set of terms with no ranking impact, while meta descriptions are the short summary text that often appears under your page title in search results and can influence click-through rates.
Should I remove meta keywords entirely instead of adding them? For most sites, yes, since the tag does nothing for rankings, but there is no harm in keeping it if you already have a reason to use it.
Is editing functions.php safer than editing header.php? Generally yes, since functions.php keeps your code organized in one place and is less likely to get overwritten during minor theme tweaks, though both should ideally live inside a child theme.
Conclusion
Adding meta keywords in WordPress without a plugin comes down to two simple paths. You can drop a short function into functions.php, or you can insert the tag directly into header.php. The first method is cleaner and easier to manage over time, while the second gets the job done just as fast for a one-time edit.
Keep in mind that this tag carries almost no weight with modern search engines. If your main goal is better rankings, your time pays off far more when you focus on strong titles, clear meta descriptions, and a well-organized heading structure across your content. Use the steps above if you have a specific reason for the meta keywords tag, back up your site first, and you will have it running in a few minutes.

MD. Thouhidul Islam is a WordPress specialist and the founder of Affilancer.com. With a background in web development and technical SEO, he shares practical troubleshooting guides, plugin reviews, and performance tips to help site owners build fast and secure websites. Thank you for supporting me.

