[Cialug] an easier way?

Scott Yates Scott at yatesframe.com
Wed Apr 22 15:44:53 UTC 2020


Ya you want to mess with the regex replace in mysql.  I don't know
specifically what the issue is, but that is the right path.

On Wed, Apr 22, 2020 at 10:42 AM <chris at bynw.com> wrote:

> i;ve tried the option here:
>
> https://www.wpbeginner.com/wp-tutorials/how-to-find-and-replace-text-with-one-click-in-your-wordpress-database/
> for using phpmyadmin and running a sql script there.
>
> update wp_posts set post_content =
> replace(post_content,'Text to find','text to replace with');
>
> I tried using the entire string of the redirect script. that created a
> ton of errors. apparently being taken for multiple searches or something
> due to the syntax of the javascript.
>
> So I tried using the regex bit (thanks) but that didnt return any
> results when I ran a simulated run of it.
>
> If i could get that to work. It would save a ton of time.
>
>
>
> On 2020-04-22 10:04, Scott Yates wrote:
> > If you decide to go the regex route, this should match the entire
> > script
> >
> > <script>var._0x2cf4.*?</script>
> >
> > then you just replace with empty string.
> >
> > On Wed, Apr 22, 2020 at 10:03 AM Dave Hala <dave at 58ghz.net> wrote:
> >
> >> I wouldn't edit the dump file, that's just asking for some pain.  I'd
> >> update the data in the database.
> >>
> >>
> >>
> >> On Wed, Apr 22, 2020 at 9:58 AM Scott Yates <Scott at yatesframe.com>
> >> wrote:
> >>
> >> > I suspect the best way will be with a regex replace directly in the
> >> > database.
> >> >
> >> >
> >>
> https://stackoverflow.com/questions/986826/how-to-do-a-regular-expression-replace-in-mysql
> >> >
> >> >
> >> > You can edit the dump file, but you run the risk of messing up more
> than
> >> if
> >> > you do it via sql and limit it to the field.
> >> >
> >> > On Wed, Apr 22, 2020 at 9:51 AM <chris at bynw.com> wrote:
> >> >
> >> > > The theme was replaced. Uploaded fresh copy. Using phpmyadmin and
> >> > > searching for the keywords of the script. I get over 700 results.
> >> > >
> >> > >
> >> > >
> >> > > On 2020-04-22 09:47, L. V. Lammert wrote:
> >> > > > On Wed, 22 Apr 2020 chris at bynw.com wrote:
> >> > > >
> >> > > >> wordfence isnt available that i saw anyway. i can double check to
> >> see.
> >> > > >> but all the php files were nuked and re-uploaded from fresh
> copies.
> >> > > >> it's in the sql file of the database dump. the redirect script
> that
> >> is
> >> > > >> on every post. over 700 instances of it. thus the need for an
> easier
> >> > > >> way of removing it. manually editing 700 posts is time consuming.
> >> > > >>
> >> > > > Seriously doubt that it's in every post, .. more likely the theme.
> >> > > >
> >> > > >       Lee
> >> > > > _______________________________________________
> >> > > > Cialug mailing list
> >> > > > Cialug at cialug.org
> >> > > > https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
> >> > > _______________________________________________
> >> > > Cialug mailing list
> >> > > Cialug at cialug.org
> >> > > https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
> >> > >
> >> > _______________________________________________
> >> > Cialug mailing list
> >> > Cialug at cialug.org
> >> > https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
> >> >
> >>
> >>
> >> --
> >> NIFCAP  -The Premier Client Intake System for Non-Profit
> >> Organizations.
> >> https://www.osis.us
> >> _______________________________________________
> >> Cialug mailing list
> >> Cialug at cialug.org
> >> https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
> >>
> > _______________________________________________
> > Cialug mailing list
> > Cialug at cialug.org
> > https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
>


More information about the Cialug mailing list