How To Make Bulk Page/Post Edits in WordPress

Two different bosses from two different industries told me that if a task feels repetitive, then you are using the wrong tools.

This is especially true when it comes to auditing, editing and implementing website modifications.

This is a common scenario: You are a marketer, or website owner and you manage a large website that uses WordPress.

You can make changes to your website, unlike website software of the past. You’ve selected WordPress over web builders to make bulk changes.

It doesn’t matter if you want to bulk edit WordPress to post content, titles or any other part of your taxonomy…

It’s still tedious.

You have two options if you don’t have the MySQL skills or developer resources. Sometimes, a plugin such as Yoast will offer bulk edit options. However, even then, it is not very efficient.

Bulk edits is when I refer to spreadsheet data that can be uploaded and edited thousands upon request.

This tutorial is about that. These are some common situations where you can use the technique.

  • Bulk title modifications
  • Bulk meta descriptions changes
  • Change your headlines
  • Editing content text for a rebrand
  • Bulk adding to a bunch of pages (ie, city Pages for a Local Website).
  • Editing product content
  • Editing tags, and category data

You can do anything you want, but only WordPress will allow you to edit pages manually.

What you’ll need

An overview of post_ids in WordPress.

WordPress’ post_id field is the ID number for every page or post in your WordPress database. The post_id is the ID number of every post/page in your WordPress database. Even though the content may change, it will always be the same. You will need to create pages/posts if you want to add more pages/posts than you have.

Post_ID’s can be found in the Admin Panel links.

Access the phpMyAdmin. The phpMyAdmin account is where you will find it. This allows you to access your WordPress database directly.

You can use Excel or Google Sheets, but for uploading your CSV file you will need to format it in a specific way. This is easy with LibreOffice.

This is the Really Simple CSV plugin. It will allow you to upload your CSV file to WordPress and match up & override any database fields with your edits. Download it here. Although it hasn’t been updated for a while, I found it safe to use in 2020. WP All Import is a premium option, but this plugin worked well for me on my latest 1200 page project.

Backup of your WordPress Database. Do not attempt this without a copy. You can import your old database via phpMyAdmin if something goes wrong.

Step 1. 

You will need all page data from WordPress to start. Because post_id is usually not publicly available or crawlable, you will need to obtain it directly from the database.

Although these steps might seem complicated, they are easy to follow, especially if your web hosting is shared, VPS, or HTML3_ HTML4_ HTML5_, which comes with common account management software such as cPanel. These screenshots are InMotion hosting. You can find cPanel at your hosting company.

Load cPanel, and scroll.

Go to phpMyAdmin.

Locate your database. There will be many tables in your database, such as users and posts.

For content changes like the one I highlighted in the screenshot, locate your WP_Posts.

  • You can edit tags or categories by looking at the terms and taxonomy tag.
  • You can edit meta content (like Yoast SEO Changes) by looking at the _PostMeta table.
  • You can bulk edit content from other plugins such as WooCommerce or BuddyPress. Look for the relevant database tables.

Export the table to CSV and add column names.

Step 2. 

Your CSV file will be cluttered. To delete or clean up the CSV file, you’ll need your spreadsheet software.

It is important to keep the Post_ID column intact, as well as a column that helps you identify what post is (e.g. post title), and the post_type field, which allows you to distinguish between pages, posts, and other content types.

You can also use the PostID to match the SEO Titles via LOOKUP if you have downloaded another table like the _PostMeta.

You can add new content by assigning a Post_ID if it does not exist.

If the column you wish to edit is already present, you can leave it and move on to the next step. If the column is not there, then you will need to add a header for it. These are the default database headers you can add:

  • post_author: Login or ID. The author’s user name or number.
  • post_date (string) The time at which the publication date was published.
  • post_content (string) The complete text of the post.
  • post_title (string) The title for the post.
  • Post_excerpt (string) All your post excerpt needs.
  • post_status (‘draft’, ‘publish’, ‘pending’, ‘future’ or private’ status) This is the status of the post. default is ‘draft’.
  • post_password (string) Password to protect the post. The password can only contain 20 characters
  • post_name (string) The title of the post.
  • post_parent (int). The post parent ID. This is used for the page or hierarchical type of post.
  • menu_order: (int)
  • post_type (‘post’, ‘page’, or any other type of post name) (required) The post type slug and not the labels.
  • post_thumbnail (string) The path or uri of the post thumbnail. E.g. http://example.com/example.jpg or /path/to/example.jpg
  • post_category (string, comma separated). slug of post category
  • post_tags: String, comma separated. Name of post tags
  • Tax_taxonomy is (string, comma separated). Any field that begins with tax_ will be treated as a custom taxonomy. Taxonomy must exist already. Entries are the names or slugs for terms.
  • comment_status: (‘closed’ or ‘open’) Default is the option ‘default_comment_status’, or ‘closed’.

Note: An empty cell in a csv file does not mean “delete it”, but “keep it”.

Note: To change the page template for a page use the custom field key of HTML_page_template.

Here are the database headers for SEO that use Yoast SEO.

  • Use _yoast_wpseo_focuskw to identify your focus keyword/target in Yoast.
  • _yoast_wpseo_title is used to create your page’s title tag.
  • _yoast_wpseo_metadesc – use to define your meta description on that page.
  • _yoast_wpseo_primary_category – use to define your primary category for breadcrumbs.
  • _yoast_wpseo_canonical – use to define your canonical.
  • _yoastwpseo_meta-robots-noindex – use to define if it’s a NOINDEX page (1 is yes value)
  • _yoastwpseo_meta-robots-nofollow – use to define if it’s a NOFOLLOW page (1 is yes value)

These are the main features of RankMath if you’re using Yoast instead.

  • rank_math_title
  • rank_math_description
  • rank_math_focus_keyword

You can search your database for fields that are compatible with other plugins. To find the correct value, take a note of the value.

Download the Really Simple CSV sample CSV.

Step 3. 

This post does not include a tutorial on Excel / Google Sheets. However, at this point you will need to make the necessary changes in the correct rows and columns.

Save the file as CSV.

Next, open the file using LibreOffice. Next, save the file as a CSV and follow these instructions:

1. 2. Select UTF-8 for your charset. Field delimiter must be “,”

3. All text cells must be quoted

Step 4. 

If you don’t have really Easy CSV, install it now.

Go to your WordPress Dashboard. Tools – Import CSV.

Upload your CSV file.

To quickly scan all of your pages, audit a few pages.

Feel the sensation of amazing productivity.

Video Walkthrough

Next steps

Decide whether you will need to make large changes to WordPress. Continue scrolling to the What you’ll need section and organize everything.

For marketers with large websites, it is not ideal to perform a “hot fix”, i.e., a site that is live. Ask your developer whether you have a staging website that you can upload changes to and test them before you “push” the changes live. You can also use a WordPress Hosting Plan with staging areas built in.

Create a demo site before you make hundreds of changes to your live site.

Last but not least, be aware that you shouldn’t upload too many changes to a shared server. Your upload will fail at best. Your server will crash if you try to edit 10,000 pages simultaneously. Consider dividing your CSV into smaller pieces depending on your server’s limits.

We will be happy to hear your thoughts

Leave a reply

Sezmi
Logo
Enable registration in settings - general