Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Puchar WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Jak wyszukiwać i zamieniać w WordPressie za pomocą wtyczki

Uwaga redakcyjna: Otrzymujemy prowizję z linków partnerskich na WPBeginner. Prowizje nie mają wpływu na opinie i oceny naszych redaktorów. Dowiedz się więcej o Proces redakcyjny.

Czy chcesz przeprowadzić wyszukiwanie i zamianę w WordPress? Niedawno jeden z naszych użytkowników zapytał nas, jak uruchomić wyszukiwanie i zamianę w bazie danych WordPress bez pisania kodu SQL lub korzystania z phpMyAdmin. Wielu początkujących nie czuje się komfortowo z kodem, więc dlatego znaleźliśmy wtyczkę do wyszukiwania i zamiany dla WordPress. W tym artykule pokażemy, jak wyszukiwać i zamieniać w WordPress.

Search and replace text in WordPress database

Pierwsze kroki

Niezwykle ważne jest, aby utworzyć pełną kopię zapas ową WordPress przed wprowadzeniem jakichkolwiek zmian w twojej bazie danych WordPress.

Ta najlepsza praktyka powinna stać się nawykiem, ponieważ rzeczy mogą pójść źle w każdej chwili, gdy wprowadzasz bezpośrednie zmiany w bazie danych WordPress. Jeśli masz kopię zapasową, możesz łatwo przywrócić twoją witrynę WordPress bez utraty czegokolwiek.

Instalacja i korzystanie z funkcji Better Search and Replace dla WordPress

Pierwszą rzeczą, którą musisz zrobić, to zainstalować i włączyć wtyczkę Better Search Replace. Po włączaniu należy przejść na stronę Narzędzia „ Lepsze wyszukiwanie i zamiana, aby korzystać z wtyczki.

Better search replace plugin settings

Po prostu dodaj ciąg tekstowy, który chcesz wyszukać, a następnie dodaj tekst zastępczy.

Następnie musisz wybrać tabele, które chcesz przeszukać. Na przykład, jeśli chcesz wyszukać i zamienić tekst w twoich wpisach, możesz wybrać tabelę wpisy. Możesz także wybrać wiele tabel, jeśli chcesz.

Dowiedz się więcej o zarządzaniu bazą danych WordPress i o tym, co robi każda tabela w WordPress.

Wtyczka umożliwia wyszukiwanie i zamianę z uwzględnieniem wielkości liter. Może również wykonać suchy przebieg, który pozwala zobaczyć, ile komórek ma wpływ na twoje wyszukiwanie bez faktycznego zastępowania tekstu.

Gdy jesteś zadowolony, kliknij przycisk „Uruchom wyszukiwanie/zamień”. Jeśli nie zaznaczyłeś opcji suchego uruchamiania, wtyczka uruchomi teraz wyszukiwanie i zamianę w twojej bazie danych WordPress.

Rozwiązywanie problemów

Podczas wyszukiwania i zamiany może pojawić się biały ekran lub przekroczenie limitu czasu. Wystarczy kliknąć kartę ustawień na stronie wtyczki.

Troubleshooting timeouts during search and replace

Zauważysz opcję maksymalnego rozmiaru strony. Spróbuj zmniejszyć rozmiar strony, aby uniknąć timeoutów i białego ekranu.

To wszystko, mamy nadzieję, że ten artykuł pomógł ci znaleźć lepszą wtyczkę do wyszukiwania i zastępowania bazy danych WordPress. Możesz również zapoznać się z naszym poradnikiem, jak wyczyścić twoją bazę danych WordPress w celu zwiększenia wydajności.

Jeśli podobał ci się ten artykuł, zasubskrybuj nasz kanał YouTube, aby zobaczyć poradniki dotyczące filmów WordPress. Możesz nas również znaleźć na Twitterze i Facebooku.

Ujawnienie: Nasze treści są wspierane przez czytelników. Oznacza to, że jeśli klikniesz na niektóre z naszych linków, możemy otrzymać prowizję. Zobacz jak WPBeginner jest finansowany, dlaczego to ma znaczenie i jak możesz nas wspierać. Oto nasz proces redakcyjny.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Najlepszy zestaw narzędzi WordPress

Uzyskaj BEZPŁATNY dostęp do naszego zestawu narzędzi - zbiór produktów i zasobów związanych z WordPressem, które każdy profesjonalista powinien mieć!

Reader Interactions

24 komentarzeZostaw odpowiedź

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

    • WPBeginner Support says

      The plugin does have the ability to search what was added through other plugins, you would mainly want to make ensure you search the correct tables.

      Administrator

  2. Paul G says

    Thanks, this mostly worked for me but didn’t quite change all of the image links.

    The rest I could easily change myself by editing the custom modules.

  3. Karol says

    Changed a website from http to https via cpanel; green lock did not appear and „connection is not secure” warning was present. This plugin worked great for me. The only difference I did was that I left the checkmark off „Case Insensitive?”.

    Every site can be different with it’s own hurdles to jump through but the dry run seemed to look okay without any errors so I ran with it. Green lock appeared right away for the site. Plugin worked for me. I hope it continues to work with other sites.

    My only question now is … Do I leave the Better Search Replace plugin installed and activated or do I uninstall it now that I’m done?

    • WPBeginner Support says

      That would be a personal preference question but you should be able to remove the plugin without worry :)

      Administrator

  4. Mandy says

    Hello,

    My site is having issues showing images lately, and my host said that it’s because the paths are wrong. They recommended this plug in, but my problem is that I am not sure what I am searching and replacing. Here’s why:

    When I insert an image in „visual” mode within a post, it shows up. They all do.
    Then when I preview or publish, some images don’t show up. What I am noticing lately is that instead of the code showing them as „image.jpg”, they now have the image size you choose in the path – „image-300×188.jpg” (this happens to be the medium size for this particular image). Why is it putting the pixel dimensions? If none of the images worked, I could say yes, the paths are incorrect, but some images DO work! I am officially bamboozled. It seems so random.

    Best,

    Mandy

  5. Ashraf Ali says

    I am switching from http to https now the common problem faced is broken css, I am wondering if could use this plugin to replace https:// to just //

    So that all contents are delivered over https

    Cheers

  6. Drew says

    I had a program enter structured data that is all different. I want to remove everything between and including this : ———————-

    How would I do that?

    • WPBeginner Support says

      Hi Drew,

      We are not sure we completely understand your issue. However, we are guessing that you had a plugin to add structured data and now you want to remove the structured data from your WordPress posts and pages? If this is the case, then you can simply uninstall the plugin.

      Administrator

  7. Sueli says

    Great plugin!

    I have a question.
    Can I use a wildcard?

    I am trying to remove numbers added after an image file. They are different (both the numbers and their length). The stop point would be the („).

    Some examples of what I want to replace with (jpg”)
    (jpg?11906004322295206140″)
    (jpg?15231215847335105667″)
    (jpg?82668654789154738″)

    Is it possible with this plugin?

    Thanks

  8. David says

    I download „Better Search & Replace. Once it found entries, it doesn’t show me unless I buy premium addon.

    So instead I ditched that and downloaded „Search & Replace”. It took me only two minutes to replace 100 entries.

  9. Ralpheal says

    Wow thanks so much, this is truly a luxury. Going to save me a lot of time, as I was considering changing a phone number on 1oo’s of blog posts.

    Thanks so much, :)

    Ralpheal

  10. Mike says

    This plugin did not work for me. I backed up the database, then unchecked „Dry Run”. It messed up things all over the site and there was no way to undo the changes.

    I even tried to restore the database backup I created with it before making changes and that didn’t work. Don’t use this unless you’re prepared to do an entire site restoration.

  11. vikas kumar says

    sir
    help me out from pagination error i did which you show in video but i didn’t get result
    i am using macbook air in this your given shortcode not work properly

  12. Marko Tiosavljevic says

    yes, but this plugin is practically useless when it comes to migrations.

    When you migrate website from domain . com to another . com you need to change

    you need to connect to database for changing url or you need to insert it in wp_config as url

    i am working on external app wp safe mode that is solving this problems in best way.

  13. Nico says

    Hi, it seems that this plugin is no longer available in WordPress Plugin Directory. Which alternative plugin do you recommend?

    With kind regars,
    Nico.

  14. Brian says

    Does this take into account serialize data or will it break plugins that use serialized metadata? I know of a few plugins that do this for migration purposes. If it doesn’t it could cause more problems than it solves.

Zostaw odpowiedź

Dziękujemy za pozostawienie komentarza. Pamiętaj, że wszystkie komentarze są moderowane zgodnie z naszymi polityka komentarzy, a Twój adres e-mail NIE zostanie opublikowany. NIE używaj słów kluczowych w polu nazwy. Przeprowadźmy osobistą i konstruktywną rozmowę.