3 ways to change all the links on the site

Webmasters often have to perform all sorts of routine work.

For example, do you sometimes need to replace all the links on the site, and if they are added on hundreds of pages? It would take an entire eternity, it’s good that there are ways to quickly replace all the same links at once.

Mass replacement of links on the site allows you to save a lot of time, and this article will present several ways at once to help you do this as quickly as possible.

Not so long ago, this was useful to me the most, since the game had changed the domain zone, I had to change all the links to this project.

3 ways to change all the links on the site

We do not include the option of attracting freelancers to the list. You can always find someone who is ready for a fee to do routine work.

You can find it on, but it would be imprudent to entrust access to the content of a large site, so the option is not the best.

In order not to risk security, use the following methods:

  1. Query in the database.

The quickest and easiest way to replace the links on the site is to go to phpmyadmin and fulfill the request there. First you need to log in there and find the database "wp_posts" with the field "X" (there are addresses). Next, go to the SQL tab and enter the query:

UPDATE wp_posts SET X = REPLACE (X, 'old URL', 'new URL')

Press Enter or click the button to start the command. Everything, you can check how the links have changed on the site.

  1. PHP Script.

Do not be afraid, you will not have to create it yourself, there is already a ready version. Download - a special script from the company Interconnect.

It was developed under WordPress, but is also suitable for other engines. You will need to archive the archive to any hosting folder (just not to the root of the site) and then type the address of the directory in the browser line to start it:

3 ways to change all the links on the site
  1. Plugin.

This is an extension for CMS WordPress, with which it is also easy to replace all the links on the site. No instructions are needed to use it.

After downloading, go to the settings where you can specify the old search link and the new replacement link. Just remember to choose a database, as shown in the image:

3 ways to change all the links on the site

With the plugin, the easiest way is to replace links in large quantities, but it's up to you to decide which method to use.

Before making any changes, you need to make a copy of the database so that there are no problems in case of unforeseen situations. This will help you plugins for WordPress backups.

Just like that, all the links on the site change immediately. Ways can be useful for various purposes, when moving a site, changing addresses, changing affiliate links, and so on. Keep track of the relevance of the reference mass and get rid of broken links.

Would you also be interested in:
- How to remove bad links from comments?
- Bad links to WordPress
- Buy articles or links?

Search

Related Articles