- PHP >= 7.4
- console access
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 thedownloadBasePath
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
ortrue
) here
- 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
orphp gfontreplacer.php 'https://mywebsite.com' plugins 'uploads/font-cache' 'js,css,php' 'uploads/cache' '' 1