In the following example, the path of the website will be: /home/user/, and the path of WordPress program will be: /home/user/public_html/wordpress
Login using FTP, then create a new folder named: wptmp, so that its path will be: /home/user/wptmp
Add 777 permission to the folder, then go to the (WordPress) folder which is: /home/user/public_html/wordpress
Edit the wp-config.php file, and add the following line:
Then save the file.
Also make sure that the 777 permission is added to this folder: /home/user/public_html/wordpress/wp-content/uploads