Plugins: How to access old plugins

Plugins: How to access old plugins

obsolete plugins, abandoned plugins, removed plugins

Čest problem sa kojim se susrećem je da je neki plugin ugašen. Probao sam da ga instaliram sa WP CLI ali on ga izgleda ne vidi.

Closed (disabled) plugins are visible from the slug page - https://wordpress.org/plugins/wpclef/ for example. They don’t appear in search results or other list contexts. A imaju meta robots “noindex” pa nisu ni Google indexirani.

What to Do When a Plugin Is Removed from WordPress.org - WPMU DEV How to get your plugin removed from the directory – Mark on WordPress

How to download removed plugin

Na primer, ako je u pitanju plugin wordpatch

1
git svn clone https://plugins.svn.wordpress.org/wordpatch/ 

Problem sa ovime je što traje čitavu večnost i meri se nekad i u satima, ne razumem zašto.

Idemo na mnogo brže rešenje, ali prvo treba da otkriješ najnoviju verziju koja je bila aktivna, ali srećom to pišena sajtu u desnom sidebar-u. To ćemo izvući sa plugin web strane na wp.org komandom:

1
PN=wordpatch curl --silent https://wordpress.org/plugins/$PN/ | grep -Poi "Version:\s*<strong>\K(.+)(?=</strong>)"

on Windows PowerShell, this would be:

1
$PN = "wordpatch"; $i = iwr "https://wordpress.org/plugins/$PN/" -UseBasicParsing; $i.RawContent -match '(?<=Version:\s*<strong>)(.+?)(?=</strong>)' | out-null; $matches[0] 

Note: Lookaheads and lookbehinds are not part of the standard, Extended Regular Expression (ERE) syntax. They require a more powerful tool than the standard grep regexp, and that’s PCRE-enabled grep. So you need Perl-compatible regular expressions (PCRE) using the -P option.

Sa tom informacijom možemo da ga downloadujemo, a možemo i da ga odmah instaliramo.

To download it, use this line:

1
PN=wordpatch; wget https://downloads.wordpress.org/plugin/$PN.$(curl --silent https://wordpress.org/plugins/$PN/ | grep -Poi 'Version:\s*<strong>\K(.+)(?=</strong>)').zip

or in PowerShell:

1
$PN = "wordpatch"; ((iwr "https://wordpress.org/plugins/$PN/" -UseBasicParsing).RawContent -match '(?<=Version:\s*<strong>)(.+?)(?=</strong>)' | out-null ) ; ( $v = $matches[0] ) | out-null; iwr "https://downloads.wordpress.org/plugin/$PN.$v.zip" -OutFile "$PN.$v.zip"

To install immediately without downloading and activate it using WP CLI, use this line:

wp plugin install https://downloads.wordpress.org/plugin/$PN.$(curl –silent https://wordpress.org/plugins/$PN/ | grep -Poi ‘Version:\s*\K(.+)(?=)’).zip –activate –debug=false

PN=wordpatch; wget https://downloads.wordpress.org/plugin/$PN.$(curl --silent https://wordpress.org/plugins/$PN/ | grep -Poi 'Version:\s*<strong>\K(.+)(?=</strong>)').zip

Quickly Evaluate an Old Plugin

If it’s an active plugin, there are many other ways to do this more easily. However, here I’m emphasizing plugins that have been removed from wp.org. I use this to quickly test an old plugin and examine its code. Of course, I only do this on “non-critical” sites as it poses a security risk otherwise.

1
2
3
4
5
6
7
# quickly install
PN=wordpatch; wp plugin install https://downloads.wordpress.org/plugin/$PN.$(curl --silent https://wordpress.org/plugins/$PN/ | grep -Poi 'Version:\s*<strong>\K(.+)(?=</strong>)').zip --activate

# do the testing

# remove it
wp plugin delete $PN

date 10. Feb 2023 | modified 10. Jun 2024
filename: Wordpress » Plugins » Removed and Abandoned Plugins