HLPlanet.com – what's the net about?

Blog about Internet and all the wonderful things about it. Some stuff about tech and software too.

PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s) – WordPress Error

If you encounter an error on your WordPress website:

PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/admin/web/your.domain/public_html:/home/admin/tmp) in /home/admin/web/your.domain/public_html/wp-includes/functions.php on line 1366

Or a similar error, it doesn’t have to be functions.php file, it can be any file from WordPress core files then you have probably moved your website to another server.

You will find this error in your website’s error log, it will cause the website to return probably HTTP Error 500 Internal server error or 403 Forbidden error.

There’s a fix to this error. Go to phpMyAdmin and:

  1. Choose the wp_options table.
  2. Click Search, and enter “upload_path” in the “option_name” field.
  3. This should return one row with your old host’s path as the “option_value”. Double-click the value to edit, and change it to the path of the “uploads” folder at your new host (you should be able to figure it out via FTP or your host’s control panel).

Related articles

How to Choose Good Domain Name for Website or Blog?

Domain name is the address in the internet, the letters and words we put into browser to find particular website. A good domain name is important, it is like name of your company or brand you want to represent. It can also help you to bring more people to the website – if the name is short, […]

Leave a Reply

Your email address will not be published. Required fields are marked *