Deploy theme files to HostGator via FTP. Use when uploading front-page.php, style.css, functions.php, or any theme file to backontrackwellness.co.za or mehealth.co.za.
$ftpCred = '[email protected]:0*QH+.=Cd^4?B8uKZXdvs$eH'
curl.exe -o "C:\temp\<localname>" "<ftpUrl>" -u $ftpCred -s --max-time 60
C:\temp\Use index-based PowerShell string operations for PHP files:
$raw = [System.IO.File]::ReadAllText("C:\temp\<file>")
# Use .IndexOf(), .Substring(), string concatenation
[System.IO.File]::WriteAllText("C:\temp\<file>", $result)
curl.exe -T "C:\temp\<localname>" "<ftpUrl>" -u $ftpCred -s --max-time 60
curl.exe -s "https://<domain>/" --max-time 30 -o C:\temp\verify.txt
Get-Content C:\temp\verify.txt | Select-String "expected-pattern"
$ — always single-quote the credential string\r\n line endings — never use .Replace() with here-strings