✅ Fixed bulk conversion getting stuck on missing files ✅ Added robust error handling and timeout protection ✅ Improved JavaScript response parsing ✅ Added file existence validation ✅ Fixed missing PHP class imports ✅ Added comprehensive try-catch error recovery 🔧 Key fixes: - File existence checks before conversion attempts - 30-second timeout protection per file - Graceful handling of 500 errors and JSON parsing issues - Automatic continuation to next file on failures - Cache busting for JavaScript updates 🎯 Result: Bulk conversion now completes successfully even with missing files 🚀 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
5.1 KiB
Executable File
These instructions are actually just notes for myself. Some commands work only in my environment.
If it is only the README.txt that has been changed:
- Validate the readme: https://wordpress.org/plugins/developers/readme-validator/
- Update the tag below to current
- Update the commit message below
- Run the below
cd /var/www/we/svn/
cp ~/github/webp-express/README.txt trunk
cp ~/github/webp-express/README.txt tags/0.20.1
svn status
svn ci -m 'minor change in README (now tested with Wordpress 5.8 RC2)'
After that, check out if it is applied, on http://plugins.svn.wordpress.org/webp-express/
and here: https://wordpress.org/plugins/webp-express/
'changelog.txt' changed too? WELL - DON'T PUBLISH THAT, without publishing a new release. Wordfence will complain!
before rsync, do this:
-
Run
composer updatein plugin root (and remove unneeded files. Check development.md !)composer updatecomposer dump-autoload -o
rm -r vendor/rosell-dk/webp-convert/docs rm -r vendor/rosell-dk/webp-convert/src/Helpers/*.txt rm vendor/rosell-dk/dom-util-for-webp/phpstan.neon rm composer.lock rmdir vendor/bin
-
Make sure you remembered to update version in:
- the webp-express.php file
- in
lib/options/enqueue_scripts.php - in
lib/classes/ConvertHelperIndependent.php - in
README.txt(Stable tag) - UNLESS IT IS A PRE-RELEASE :)
-
Perhaps make some final improvements of the readme. Inspiration: https://www.smashingmagazine.com/2011/11/improve-wordpress-plugins-readme-txt/ https://pippinsplugins.com/how-to-properly-format-and-enhance-your-plugins-readme-txt-file-for-the-wordpress-org-repository/
-
Make sure you upgraded the Upgrade Notice section.
-
Validate the readme: https://wordpress.org/plugins/developers/readme-validator/
-
Make sure you have pushed the latest commits to github
-
Make sure you have released the new version on github
And then:
cd /var/www/we/svn
svn up
PS: On a new computer? - checkout first: `svn co http://plugins.svn.wordpress.org/webp-express/``
If you have deleted folders (check with rsync --dry-run), then do this:
cd trunk
svn delete [folder] (ie: svn delete lib/options/js/0.14.5). It is ok that the folder contains files
svn ci -m 'deleted folder'
(workflow cycle: http://svnbook.red-bean.com/en/1.7/svn.tour.cycle.html)
Then time to rsync into trunk: dry-run first:
cd /var/www/we/svn
rsync -avh --dry-run --exclude '.git' --exclude '.github' --exclude='composer.lock' --exclude='scripts' --exclude='vendor/rosell-dk/webp-convert/.git' --exclude='vendor/rosell-dk/webp-convert/.git' --exclude='.gitignore' ~/github/webp-express/ /var/www/we/svn/trunk/ --delete
cd /var/www/we/svn
rsync -avh --exclude '.git' --exclude '.github' --exclude='composer.lock' --exclude='scripts' --exclude='vendor/rosell-dk/webp-convert/.git' --exclude='.gitignore' ~/github/webp-express/ /var/www/we/svn/trunk/ --delete
It should NOT contain a long list of files! (unless you have run phpreplace)
- and then WITHOUT "--dry-run" (remove "--dry-run" from above, and run)
TESTING
- Create a zip
- Select all the files in trunk (not the trunk dir itself)
- Save it to /var/www/we/pre-releases/version-number/webp-express.zip
- Upload the zip to the LiteSpeed test site and test
- Login to https://betasite.com.br/rosell/wp-admin/plugins.php
- Go to Plugins | Add new and click the "Upload Plugin button"
- Upload the zip to other sites and test
Committing
Add new and remove deleted (no need to do anything with the modified):
cd svn
svn stat (to see what has changed)
svn add --force . (this will add all new files - https://stackoverflow.com/questions/2120844/how-do-i-add-all-new-files-to-svn)
svn status | grep '^!' (to see if any files have been deleted)
svn status | grep '^!' | awk '{print $2}' | xargs svn delete --force (this will delete locally deleted files in the repository as well - see https://stackoverflow.com/questions/4608798/how-to-remove-all-deleted-files-from-repository/33139931)
Then add a new tag
cd svn
svn cp trunk tags/0.25.8 (this will copy trunk into a new tag)
And commit!
svn ci -m '0.25.8'
After that, check out if it is applied, on http://plugins.svn.wordpress.org/webp-express/ And then, of course, test the update ... And THEN. Grab a beer and celebrate!
And lastly, check if there are any new issues on https://coderisk.com
New:
svn co https://plugins.svn.wordpress.org/webp-express /var/www/webp-express-tests/svn
BTW: Link til referral (optimole): https://app.impact.com/
On brand new system:
-
Install svn
sudo apt-get install subversion -
create dir for plugin, and
cdinto it -
Check out
svn co https://plugins.svn.wordpress.org/webp-express my-local-dir(if in dir, replace "my-lockal-dir" with ".")