In this post, I will describe an instance where I was transferring a WordPress site from one cPanel to another. After I moved the site from one server to another I got the following error:
Warning: fopen(/home/moreread/public_html/wp-content/themes/directorypress/thumbs/makemusicviral.wordpress.com.jpg) [function.fopen]: failed to open stream: No such file or directory in /home/morereader/public_html/wp-content/themes/directorypress/PPT/class/class_premiumpress.php on line 944
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/morereader/public_html/wp-content/themes/directorypress/PPT/class/class_premiumpress.php on line 945
Warning: fclose() expects parameter 1 to be resource, boolean given in /home/morereader/public_html/wp-content/themes/directorypress/PPT/class/class_premiumpress.php on line 946
To fix the error: While I was moving my site I forgot to change the path in the new cPanel location.
So I changed the path of:
Here moreread was the old cPanel username for the site and morereader is the new cPanel user name.
There can be many reasons for this error to occur. However, I am describing two basic troubleshooting methods to fix this error in your WordPress blog.
1) When you are troubleshooting fopen, fwrite, fclose errors in WordPress blog or for any other CMS make sure that the path of the file which is pointing to that location exists in new installation. If the file doesn’t exist in the specified location you need to add the file or the folder which ever is missing.
2) If the location exists then make sure that you change the file permissions of the specified folder in the error to: chmod 777 or 755. (whichever works for your server). You have to make the folder writable.
I hope these troubleshooting steps are helpful if you are stuck in the fopen, fwrite, and fclose errors in your WordPress blog.
Thats Journal is proudly powered by Genesis Framework. Genesis is state of the art WordPress Framework to create powerful, robust, secure and SEO friendly websites.
Latest posts by admin (see all)
- Boxed Layout WP eCommerce WordPress Theme With jQuery Gallery - February 16, 2018
- Responsive Full Screen Background Slider WordPress Theme - February 10, 2018
- Responsive Portfolio WordPress Theme With Fluid Width Layout - February 3, 2018