2 easy ways to bulk add multiple posts to WordPress

Bulk add multiple posts to WordPress
Table of Contents

Bulk add posts and pages is one of the challenges of WordPress site managers. They are usually looking for a fast and easy solution to help them quickly bulk add multiple posts to WordPress and edit them.

Whether you want to better manage the appearance of the site by modifying its appearance and layout, or you are developing a website or a WordPress theme, you can get help from this guide to quickly add bulk posts and pages to your WordPress website.

In this guide, we’ll show you how to easily bulk add posts and pages in WordPress by two methods: coding or the WordPress posts/page bulk edit plugin.

Why do you need to bulk add posts in WorPress?

The main reason for bulk add posts in WordPress is when you want to run a new website. In this case, you may need to quickly add WordPress multiple blog pages and posts. It is obvious that create multiple posts & pages manually in WordPress is really time consuming and frustrating. So, you need to bulk add posts WordPress to do this task faster.

Another reason is when you want to try a new WordPress Theme. Bulk upload WordPress posts help you see how the blog page looks like in the front end.

You may also need to bulk upload WordPress posts if you have prepared multiple posts on another platform and want to transfer them to your WordPress website. 

How to add multiple posts in WordPress?

In this guide, we want to show you how to let WordPress create multiple posts at once with three methods: 

  1. Create WordPress post programmatically.
  2. Bulk add posts WordPress with importing XML file.
  3. Bulk create posts WordPress with WordPress bulk post creator plugin.

Let’s review a step by step guide about how to create multiple post pages in WordPress.

WordPress add multiple posts programmatically 

WordPress is one of the most popular site builders, and the reason for its popularity is the ability to add various features by writing a few lines of simple code. Of course, this method is only suitable for experts who are familiar with coding and working with database management software. Even these experts make a backup of the site to be sure before adding any code to WordPress so that they can use it in case of any problems.

If you are somewhat familiar with coding and have backed up your site, you can bulk add multiple posts to WordPress by creating a child theme and copying the following code in functions.php.

By copying this code in which wp_insert_post() is used, 5 new posts will be added to your site. Although you can increase or decrease the number of new posts by changing the number 5 written in the first line -Green highlighted – to your desired value:

$number_of_posts = 5;
for( $i = 0; $i < $number_of_posts; $i++ ) {
          wp_insert_post(
                 array(
                       'post_title' => 'Article ' . ( $i + 1 ),
                       'post_content' => 'Some content',
                       'post_status' => 'draft'
                      )
            );
}

After running this code, as you can see in the image below, 5 new posts will be added to WordPress, whose title will be displayed as Article + Post number.

result adding product code in WordPress

However, if you want to bulk add new posts to WordPress with specific titles, copy the below code that allows you to create multiple posts at the same time by adding a list of titles.

$titles = array(
' Bulk add multiple post WordPress example',
' Bulk upload posts to WordPress',
' Bulk add multiple post WordPress programmatically',
);
foreach( $titles as $title ) {
wp_insert_post(
array(
'post_title' => $title,
'post_status' => 'publish' // let's publish posts immediately
)
);
}

As you can see, a new list of posts with the titles you inserted in the code will be published on the site. By changing the inserted titles, you can add posts with desired titles – Green Highlighted lines – to your site:

result adding posts code in WordPress

You can also use the following code to add values to fields such as categories, tags, and custom fields:

$articles = array(
            array(
                           'title' => 'Where to work with laptop in Athens?',
                           'city' => 'Athens',
            ),
            array(
                           'title' => 'Coffee Guide to Istanbul',
                           'city' => 'Istanbul',
            ),
            array(
                           'title' => 'Snowboarding in Georgia',
                           'city' => 'Gudauri',
            ),
                            array(
                           'title' => 'How to bulk publish posts with WordPress REST API',
        )
);
foreach( $articles as $article ) {
             $article_id = wp_insert_post(
                         array(
                                      'post_title' => $article[ 'title' ],
                                      'post_status' => 'publish'
                          )
             );
             if( ! empty( $article[ 'city' ] ) ) {
                         update_post_meta( $article_id, 'city', $article[ 'city' ] );
                         wp_set_post_terms( $article_id, 'travel', 'post_tag' );
            }
}

After running this code, the following posts with the Travel tag will be added to the post. A meta field named City is also created for the posts, with the name of each city assigned to it:

result adding posts code with travel tag in WordPress

WordPress create multiple posts at once by importing XML file

Although bulk adding posts to WordPress by importing XML files is not the simplest method, it is useful when you have some prepared posts in your system and you want to bulk upload WordPress posts to your website. To use this method, first, you need to prepare an XML file that is readable by the WordPress Importer tool. 

Reading the step-by-step guide below can make doing this task easier for you.

Step 1: Create an XML file for new WordPress posts

Preparing an XML file with the right format is the most important step for wp insert post with this method. We recommend you create an Excel file and add the most common columns with their titles and values which are:

titlevaluesType
post_authorThe user name or user ID number of the authorlogin or ID
post_dateThe published timestring
post_contentThe full text or bodystring
post_titleThe title string
post_excerptShort descriptionstring
post_status‘draft’ or ‘publish’ or ‘pending’ or ‘future’ or ‘private’ or custom registered statusstring
post_passwordThe password to protect the post- limited to 20 charactersstring
post_nameThe slug of the poststring
post_parentThe post parent id is used for page or hierarchical post type.int
menu_orderint
post_type‘post’ or ‘page’ or any custom post type name (required)string
post_thumbnailThe URL or path of the thumbnailstring
post_categoryslug of post categoriesstring, comma separated
post_tagsname of post tagsstring, comma separated
tax_{taxonomy}Taxonomy name or slug that already exists. string, comma separated
custom_field_keycustom fieldstring
cfs_{field_name}Data of custom fields created by CFSstring
comment_status‘closed’ or ‘open’string

You do not need to have all the columns, just add the most important columns like:

  • Post_title
  • Post_content
  • Post_date
  • Post_author
  • Post_type
  • Post_status
XML file for new WordPress posts

Then save the file in XML format:

Select save file XML format

Step 2: Run WordPress default Importer

After saving your file successfully, access the WordPress admin and go to the below address:

WordPress dashboard > Tools > Import

Select import sub-menu in WordPress dashboard tools menu

On this page, you need to press Run Importer to let WordPress bulk upload posts from XML file.

Press Run Importer option to WordPress bulk upload posts from XML file

Step 3: Import XML file to bulk add posts to WordPress

Click the Choose file button and select the XML file from your system.

Import XML file to bulk add posts to WordPress

As soon as adding the XML file, you can press the Upload file and import button to start the wp insert post process. 

Press Upload file and import button to wp insert post

Step 4: Specify missing information and submit

The WordPress will check that things have been imported correctly. If there is any missing data, you are asked to insert the proper value for the fields and finally press the Submit button to bulk upload WordPress posts.

Specify missing information and press submit

Finally, you will see a list of all uploaded posts with an All Done message, which means all posts were successfully inserted to your WordPress site.

list of all uploaded posts result with an All Done message

Add multiple post using WordPress posts bulk edit plugin

WordPress posts/pages bulk edit plugin will allow you to bulk edit WordPress posts with just one click. In addition, you can edit all post fields in bulk by using an easy to use interface of this plugin.

WordPress posts/pages bulk edit plugin tools support bulk editing of all types of posts, pages, media, custom posts, etc.

In this plugin, you can also filter posts based on various attributes such as title, tags, image, published date, status, allow comments, author, password, metadata, etc.

If you are not familiar with coding or are looking for a simple and quick way to add multiple posts or pages to your site at the same time, follow the three simple steps below:

Step 1: Install the WordPress posts/page bulk edit plugin

To use the WordPress page bulk edit plugin, first, you need to download and install it on your WordPress website like other plugins and activate it.

Now, you can see the iT Bulk Editing tab in the WordPress Dashboard:

select woo posts section in Bulk Editing menu

To open the main page of the plugin, you need to click on the WP Posts menu.

In the new page that just appeared, you can find a list of all posts in a table with a toolbar on top.

In the next step, we show you how to use the plugin for bulk uploading posts to WordPress.

Step 2: Bulk add multiple posts to WordPress

To bulk upload WordPress posts, click on the Add icon on the plugin toolbar:

select add icon in plugin toolbar

In the new pop-up displayed on the screen, insert the number of new posts you want to add. You can either type the number or use the Up and Down arrows to increase/decrease the number.

select number of new posts in plugin WordPress

By pressing on the Create button, you can see a list of new posts in the post table.

result of adding post to WordPress table

There is no value in these new posts. So, in the next steps, you need to edit posts and add information like description, status, category, etc.

Step 3: Edit created WordPress posts

WordPress posts bulk edit plugin provides you with various tools for editing posts and pages. Let’s review them, briefly by making some examples.

WordPress post bulk edit

Bulk add multiple WordPress posts example 1: Use bulk edit form

The fastest method for bulk editing the posts and pages in WordPress is using the comprehensive Bulk Edit form in our plugin.

For example, consider that you want to assign Food and Lifestyle categories to some of the new posts.

To do this, you have to follow the below steps:

  1. Mark your desired posts in the table.
  2. Click on the Bulk Edit icon on the toolbar.
select bulk edit icon in plugin toolbar
  1. In the Bulk Edit Form, Open Categories/Tags/Taxonomies tab.
  2. Choose Append from the Operator box of the Categories field, then select Food and Lifestyle from the list of categories.
select categories and tags fields in Bulk Edit Form

By pressing Do bulk Edit bottom, the specified categories are appended to the selected posts. 

result categories and tags fields in WordPress table

Now, let’s try to remove Uncategorized items from the assigned categories. To make this happen, repeat the first 3 steps as we mentioned above.

Then, choose Delete from the Operator drop-down of the Categories field and select Uncategorized item from the list.

select operator dropdown for categories field in Bulk Edit Form

Your required changes are applied to the table by pressing Do Bulk Edit as you expected:

result operator dropdown in WordPress table

Bulk edit multiple WordPress posts example 2: Use inline edit

WordPress posts bulk edit plugin allows store managers to edit the fields directly from the table. This is the simplest way to edit data on new posts.

To inline edit any fields in this plugin, you just need to follow 3 easy steps:

  1. Open the Column Profile form by clicking on the icon illustrated below.
select column profile icon in plugin toolbar
  1. Choose the fields you want to edit and press Apply to Table to add them to the post table.
  2. Click on the cell you want in the table, make your desired changes, and press Enter Key on the keyboard.

For example, if you want to change the published date of each post, you can choose the Date Published column in the form as illustrated below:

select general fields in column profiles form

Then, click on the Date Published cell of one of the posts in the table and use the built-in calendar to change the date.

set date published field in plugin table

Press the Enter Key to see the changes in the table very quickly and easily.

Advantages of bulk add multiple posts to WordPress

The most important advantage of bulk add multiple posts to WordPress is to speed up the launch of a new WordPress website. After creating a new site, you usually need to quickly add a number of posts or parent and child pages with a hierarchy to your site, which is time-consuming to do manually. With the help of bulk uploading posts to the WordPress method, you no longer need to enter the posts one by one or edit them individually. The WordPress posts bulk edit plugin helps the site manager save the time of creating and editing new posts and pages and spend their valuable time on other important tasks.

Also, if you want to import posts from a platform like Wix to WordPress that does not allow you to export the content of pages or posts, then use the WordPress import posts from CSV method; bulk adding multiple posts to WordPress will save time. 

Finally, the advantage of bulk upload posts to WordPress is that it can be useful for developers who are testing a WordPress theme to quickly add multiple posts and pages to see how they will appear on their site.

WordPress post bulk edit

Conclusion

In this post, we described two useful methods for bulk adding new posts to WordPress websites. We hope this comprehensive guide helped you to bulk add posts and pages faster.

You may also like to learn more about the awesome features of the WordPress posts bulk edit plugin as an ultimate solution making it easy for site managers to bulk add multiple posts to WordPress and edit them quickly. 

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha loading...