简体   繁体   中英

Running wordPress blog site in IIS (Windows Server)

I recently switched my site from Linux to Windows Server. In my old site there were WordPress Blog directory. For this I first uploaded entire blog directory to my new server & created database. Then re-configured database connection settings in wp-config file & uploaded it. All worked fine but when I clicked on any links in my blog first it takes too much time to get load(almost 2mins) & when loading finish it off then it shows me this error

PHP Warning: file_exists(): open_basedir restriction in effect. File(/home/brandst1k/public_html/blog/wp-content/uploads/2016/08) is not within the allowed path(s): (G:/PleskVhosts//brandstik.in\\;C:\\Windows\\Temp) in G:\\PleskVhosts\\brandstik.in\\httpdocs\\blog\\wp-includes\\functions.php on line 1492 PHP Warning: is_dir(): open_basedir restriction in effect. File(/home/brandst1k/public_html/blog/wp-content/uploads/2016) is not within the allowed path(s): (G:/PleskVhosts//brandstik.in\\;C:\\Windows\\Temp) in G:\\PleskVhosts\\brandstik.in\\httpdocs\\blog\\wp-includes\\functions.php on line 1497 PHP Warning: is_dir(): open_basedir restriction in effect. File(/home/brandst1k/public_html/blog/wp-content/uploads) is not within the allowed path(s):

Original error link - http://www.brandstik.in/blog/solar-rechargeable-camping-lantern/

I can understand that there is server misconfiguration which throws this error. Now only concern is how to solve this?

I had the same issue as yours, it was caused because of the misconfiguration file directory.

All you could do to solve this is add this code in your wp-config.php file.

      define('WP_TEMP_DIR','/tmp')

This did work for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM