• Skip to primary navigation
  • Skip to main content

Thats Journal

  • Home
  • About
  • Digital Marketing
    • Affiliate Marketing
    • Branding
    • Content Marketing
    • Email Marketing
    • Marketing
    • Sales and Marketing
    • SEO
  • Social Media
  • Influencers
  • Resources
  • WordPress
    • WordPress Plugins
    • WordPress Themes
  • Sitemap
  • Contact Us
  • Show Search
Hide Search

Fix fopen, fwrite, fclose Errors In WordPress For Transfer

admin · Nov 14, 2014 · Leave a Comment

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:

/home/moreread/public_html/wp-content/themes/directorypress/thumbs/

to

/home/morereader/public_html/wp-content/themes/directorypress/thumbs/

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.

Troubleshooting:

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.

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • More
  • Click to print (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Skype (Opens in new window)

Related

Download thousands of Themes, Plugins & Graphics to create your Website. Use promo code ThatsJournal and get an additional 10% off for All MonsterONE Plans.

Pro Blogging blog, boolean, chmod, CMS, cpanel, directory, expects parameter, file, file permissions, folder, location, migrate, missing, move, new installation, No such file, path, resource, server, troubleshooting, warning, writable

About admin

Thanks for dropping by! This post was published by the Editorial Team of Thats Journal. Follow us on our social media channels for current trends on Digital Marketing, Social Media Marketing and WordPress Themes.

Disclosure: Thats Journal is supported by our readers. This page may contain affiliate links. That means, if you click on these links to make a purchase, we may earn a small commission (at no extra cost to you). These funds help us to keep this blog up and running.

Categories

Subscribe via Email

Enter your email address to subscribe to Thats Journal and receive new posts by email.

Join 38,252 other subscribers

Join Our Community of 50,000+ Bloggers And Authors!

Reader Interactions

Leave a Reply Cancel reply

Copyright © 2023 Thats Journal