How to bulk change links on WordPress website? 1

How to bulk change links on WordPress website?

Need to change many links on your website at once? Don’t worry, this routine task can be automated. Here you will learn how to do it quickly and easily.

Webmasters do not like to deal with routine tasks, especially those that do not satisfy immediately. There is no doubt that the mass replacement of links on the website is one of them: although not very often, only some are content with the possibility of killing their time manually changing hundreds of URLs.

However, if you really need to do this (when moving to a new domain or if you want to replace existing links with Moyens I/O URLs, for example), don’t worry. Feel free to delegate this task to a soulless machine. How? Read our pick of the 3 best ways to do it!!

#1: MySQL query

This is the easiest and most universal recipe for working directly with a MySQL database to quickly replace all links on your website (unless you’re using this system).

Your actions are as follows. First, log into phpmyadmin, find your database containing the “wp_posts” table (if you’re using WordPress) along with the “X” field that stores the URLs. Then you should open the SQL tab and execute the following query:

UPDATE wp_posts SET Х= REPLACE (Х, “an old link”, “a new link”)

Now you just have to click “Go” (or the corresponding icon if your interface is different). A done deal!

#2: Upload PHP script to website

Bulk link modification is a well-known issue. No wonder ready-made solutions are already provided: Search and Replace script by Interconnect Company. While originally built for WordPress, it can be applied to other popular CMSs (like Drupal or Joomla).

Usage is as simple as dropping from a log: download the zip file using the link above, extract the search-replace-db-master folder (for version 3.1.0), rename it if necessary, and upload it via ftp to a common directory. your hosting (but not in the website root, remember!).

Back up your database (never, never forget to backup!) and open the uploaded folder on your server via your browser’s address bar. The script will start automatically, so you only need to select the database and connections to change.

#3: Replace Plugin for Better Search WordPress

Hate uploading other people’s scripts to your website? We know this, so we have an alternative for owners of WordPress websites. Perhaps this CMS has the most suitable plugin for bulk link replacement – ​​Better Search Replace. It can be easily integrated, compatible with any hosting (according to its developers), and looks great for working with WordPress Multisite.

Everything is pretty simple. For example, when migrating your site you need to: first integrate the plugin and make a backup of the database (mandatory!) and also install the database and engine on a new hosting. . Next, you have to set a new URL in the wp-config.php file (more on that here), log in to the new website’s admin panel and launch Better Search Replace to replace the old URLs with the new ones.

And it’s almost fixed – now you just have to remove the modified site_url parameter from the wp-config.php file and create a new .htaccess file if necessary (via Settings-Permalinks in the WordPress admin panel). Don’t forget to backup your database every time you work with it, unless possible errors from plugin customization kill your website!

last word

All of this will help you quickly and easily convert all the words “flights” in your posts into links marked as Jetradar and “hotels”, not only when moving your site and replacing one URL with another. As Hotellook.
However, if you still have doubts about your abilities and skills, you’d better find an expert. This will help you avoid potential problems with your website, thus saving your time, money and efforts.

Note: For those of you using our WordPress plugin, we have great news: We are planning to enrich its core functionality with one more function – bulk link replacement. Work … in full swing!

Support our work ❤️

If you enjoyed this article, consider leaving a tip to help us keep publishing great content.

Secure payment on PayPal
Moyens I/O Staff is a team of expert writers passionate about technology, innovation, and digital trends. With strong expertise in AI, mobile apps, gaming, and digital culture, we produce accurate, verified, and valuable content. Our mission: to provide reliable and clear information to help you navigate the ever-evolving digital world. Discover what our readers say on Trustpilot.