Non-Plugin Way of Creating XML Sitemap in WordPress

  1. XML Sitemap: From A to Z
    1. Defining an XML Sitemap
    2. How Many Pages Have to be Indexed?
    3. XML Sitemap and Bonuses it Brings
  2. How to Create a Sitemap for WordPress in Non-Plugin Way
  3. Q&A
  4. Wrapping Up

So, you’ve just built a website based on WordPress and you want it to be more visible to the search systems. There are many practices comprising internal linking, blog embedding, and keywords use, which are intended to improve SEO. But if you’ve just tried them all and are still looking for more methods, XML site maps and their creation are worth considering the next.

Creating XML Sitemap in WordPress.

In this post, we will shed some light on:

  • What XML sitemap is.
  • Why it is important for a website.
  • How to establish one without even touching a plugin.

So, without any further delay, let’s get started.

XML Sitemap: From A to Z

Let’s begin with the fundamentals before we move on to the actual practice of creating site maps.

Defining an XML Sitemap

An XML sitemap is a folder that contains important site pages and indicates how long ago you’ve conducted their update. This way, the sitemap lets Google and other web spiders understand the site structure and index the needed pages.

A sitemap as an XML file that is easily digestible by crawlers looks this way.

XML Sitemap.

While site maps can be beneficial for almost everyone who runs a web resource, there are still some cases in which they are especially crucial.

  • Pages on your e-commerce site are created dynamically.
  • Your website is known for its multimedia content.
  • The site structure or its internal linking is not that good.
  • You’ve just launched a website and it has a few external links till the current moment.
  • The site is large or has a bunch of archived poorly-linked content.

How Many Pages Have to be Indexed?

Although site maps are not new to web users, various misconceptions still exist around them; for example, every page of the site should be included in the xml file.

The truth is that the sitemap should contain the pages you have specified for indexing and crawling. If that is possible, make sure to carve up website pages into two categories: one for the pages you want users to land on from web crawlers and the other for pages you don’t want them to. Include the pages from the first category in the XML sitemap and set a condition that they should not be blocked by robots.txt. Do the exact opposite with pages you don’t want to be accessed from web spiders.

XML Sitemap and Bonuses it Brings

After Google, “In most cases, your site will benefit from having a sitemap, and you'll never be penalized for having one.” This might be a compelling reason to create it. But still, there are much more advantages of having a sitemap created.

  • XML files demonstrate what pages you want to be indexed so that search engines can crawl them in order of priority, which is especially effective for large websites.
  • In case Google Panda affected your pages, creating a sitemap can lead to website recovery.
  • A sitemap can greatly benefit the site with tree folder structure by guiding the crawlers through it and letting them capture valuable information.
  • A newly launched website packed with an XML sitemap is more likely to be visible to the web spiders.
  • You get full control over the indexation of particular pages through Google Search Console.
  • As long as the sitemap records time when the page is published and updated, you can be sure that you are entitled to the content.

So, with all the benefits of XML sitemap to keep in mind, let’s find out how to create one without leveraging corresponding add-ons.

How to Create a Sitemap for WordPress in Non-Plugin Way

There are different ways you can create a sitemap.xml file in WordPress. Some of them require the use of add-ons, such as Yoast SEO or Google XML Sitemaps, while others allow for a non-plugin way—which is something we will cover in this paragraph.

  1. Access theme folder called wp-content/themes/your_theme_folder/functions.php.
  2. Being in a text editor, open functions.php file.
  3. Copy the code below and paste it into functions.php file.

Copy the code.

Every time you publish a new page or post, WordPress will call for a sitemap.xml file and the code in there will remove older content and write a new one.



A sitemap is a folder that contains valuable data about pages and other files on the site. It tells the search systems what pages you want to be accessed by web users, hence leading to a smarter crawling process.


You might need a sitemap if you have: a large website with tree folder structure, a site containing poorly-linked archived content, or a recently launched site with a few external links or multimedia content. In case you run a small website with well-organized internal linking and not many media files, you might not need a sitemap.


There are a few methods you can go with to create a sitemap either using the corresponding add-ons or choosing the non-plugin way.


For this purpose, leverage plugins like Yoast SEO or Google XML Sitemaps.


Having a sitemap on the site significantly boosts SEO by letting search programs easily find your pages and crawl them all in the order you specify.

Wrapping Up

When it comes to improving website ranking, an XML sitemap is king. It is proved to be an effective method intended to boost SEO and let people and search robots find the website faster. Besides, you can get full control over indexation by specifying what pages you want the crawlers to land on and index. So, put your doubts aside and try a sitemap as soon as possible.

Read Also

How Technical SEO and WordPress Work Together To Give Your Business A Competitive Edge

How to Find the Perfect Sitemap Plugin for Your E-commerce Website

Best Navigation Menu Plugins For Your WordPress Website

Shopify Sitemap - a Key to Improve SEO, Traffic, and Sales

Don’t miss out these all-time favourites

  1. The best hosting for a WordPress website. Tap our link to get the best price on the market with 82% off. If HostPapa didn’t impress you check out other alternatives.
  2. Website Installation service - to get your template up and running within just 6 hours without hassle. No minute is wasted and the work is going.
  3. ONE Membership - to download unlimited number of WordPress themes, plugins, ppt and other products within one license. Since bigger is always better.
  4. Ready-to-Use Website service is the ultimate solution that includes full template installation & configuration, content integration, implementation of must-have plugins, security features and Extended on-page SEO optimization. A team of developers will do all the work for you.
  5. Must-Have WordPress Plugins - to get the most essential plugins for your website in one bundle. All plugins will be installed, activated and checked for proper functioning. 
  6. Finest Stock Images for Websites - to create amazing visuals. You’ll get access to to choose 15 images with unlimited topic and size selection.
  7. SSL Certificate Creation service - to get the absolute trust of your website visitors. Comodo Certificate is the most reliable https protocol that ensures users data safety against cyber attacks. 
  8. Website speed optimization service - to increase UX of your site and get a better Google PageSpeed score.


Self-taught copywriter specialized in web design, marketing, and traveling. Graduated with a degree in German and English translation. Obsessed with guides, listings, and long-read blog posts. Open for new information and strives to explore more undisclosed subjects. Social Media Accounts: Fb, Twitter, LinkedIn.

Get more to your email

Subscribe to our newsletter and access exclusive content and offers available only to MonsterPost subscribers.

From was successfully send!
Server error. Please, try again later.

Leave a Reply