You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
baseURL: Mandatory! The base url of your website (i.e. 'https://mywebsite.com')
targetDir: Optional! The directory which you're going to scan relative to the execution folder (i.e. plugins). Default if omitted: plugins
fileTypes: Optional! The file types (extensions) the scan should filter for. Default: 'php,js,css'. Use comma separated string without spaces (i.e. "js,py,css")
downloadBasePath: Optional! The directory where the fonts will be downloaded to, relative to your execution folder. Make sure this is part of the public facing folder structure! (i.e. 'uploads/font-cache'). Default if omitted: wp-content/uploads/font-cache.
basePath: Optional! Only needed if the downloadBasePath is not relative to the current execution directory or parts of the path would not be public facing (i.e. public). Default if omitted: `` (empty).
dryRun: Optional! If you just want to do a test/dry run use any value (i.e. 1 or true) here
USAGE
copy the script somewhere you know (i.e. ~/bin or the application's webroot)
chmod +x gfontreplacer.php
execution with at least first parameter (the BaseURL). like php gfontreplacer.php 'https://mywebsite.com or php gfontreplacer.php 'https://mywebsite.com' plugins 'uploads/font-cache' 'js,css,php' 'uploads/cache' '' 1
About
PHP based script to find and replace the usage of google fonts with local copies