I have a server and a domain name on GoDaddy.
I want to create a backup for my files to be uploaded on Google Drive
So that all my files and my database have th
It seem the backup script is unable to find the directory where the site files are stored.
Quoting from the tutorial you followed to do the backup:
// User home directory (absolute)
$homedir = trim(shell_exec("cd ~ && pwd"))."/"; // If this doesn't work, you can provide the full path yourself
// Site directory (relative)
$sitedir = "www/";
First ensure that $sitedir
is set properly with the relative path (from the home directory) to the site files directory.
It could be something different than www/
, for example public_html/
for a website hosted on GoDaddy.
If the above is correct try to set $home
variable manually with the absolute path of the home directory.
Update
$homedir
is the home directory and $sitedir
is the website root relative to $homedir
so looking at the code you posted it's quite likely there is a mistake, the two variable should be:
// User home directory (absolute)
$homedir = "/home/mhmd2991/"; // <-- FIXED HERE
// Site directory (relative)
$sitedir = "public_html/";
This assumes your website root directory is public_html
and is located inside your home directory mhmd2991
Again make sure your website root directory is actually public_html
and not www
or html
or anything else. Check it out using the terminal.