N
N
Nik_10112020-07-29 11:34:29
WordPress
Nik_1011, 2020-07-29 11:34:29

How to bulk replace href links in WordPress?

Hello.

Transferred the site from local hosting to real one, with the help of sql queries most of the links were replaced, but the button links written through HTML did not change.

Question: to replace them manually or are there any other ways?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
O
Orkhan Hasanli, 2020-07-29
@Nik_1011

If we are talking about editing static files (site files), then:
- download the site via FTP. You can only download the topic, since urls are usually not written in other places
- install and open sublime text 3 (you can use any other editor. For example, notepad ++. You have already been answered about it above)
- After opening sublime text 3, press ctrl + shift + f
the panel "search and replace by files" will open from below.
Write what to look for
Write what to replace
And indicate where to look (select a folder).
Well, click on the search and replace.
- Download back to the site
If we are talking about changing URLs in the database, then we use plugins for the VP:
Better Search Replace
Search And Replace
And here are the urls that are set in html / js in visa. editors (such as Visual Composer) will have to be edited manually. as the plugins above won't replace them. They are stored in base64 in the database and, accordingly, search and replace does not help.

N
Nikita Shinkevich, 2020-07-29
@domres

Download the entire site to your computer... drop the folder with the site (literally drag it) into a window, for example, Notepad ++...
Left-click on the folder: find in files... replace in files.... a couple of seconds and that's it will replace.
Upload back to hosting. Rejoice.

A
approximate solution, 2020-07-29
@approximate_solution

https://github.com/interconnectit/Search-Replace-DB - script
https://wpschool.ru/search-replace/ - how to correctly change paths (urls) in the database.

L
Lord_Dantes, 2020-07-29
@Lord_Dantes

If you are talking about static, then you need to copy the code of each page and, by finding one type of links, replace them all with others. This ability is in every editor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question