Can’t upload media to my Raspberry Pi WordPress server

you need to change the owner of the wordpress folder to www-data. For example, if you put your wordpress folder in /var/www/my_new_wordpress_site, you will need to run the following command: sudo chown -R www-data:www-data /var/www/my_new_wordpress_site

php exec() is not executing the command

I already said that I was new to exec() function. After doing some more digging, I came upon 2>&1 which needs to be added at the end of command in exec(). Thanks @mattosmat for pointing it out in the comments too. I did not try this at once because you said it is a Linux command, I am on Windows. So, what … Read more

How do I know the script file name in a Bash script?

For reading through a symlink1, which is usually not what you want (you usually don’t want to confuse the user this way), try: IMO, that’ll produce confusing output. “I ran foo.sh, but it’s saying I’m running bar.sh!? Must be a bug!” Besides, one of the purposes of having differently-named symlinks is to provide different functionality … Read more

bash sh – command not found 

Remove ; from the end of your script lines. This doesn’t happen in my bash, so I’m not sure what exactly is wrong, but my guess is this: ; is a separator of commands. Since your last command ends in ;, your bash probably expects another command after. Since the script finishes, though, it reads an empty command, which … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)