Title: Open basedir restriction
Last modified: March 31, 2020

---

# Open basedir restriction

 *  Resolved [Timothée Moulin](https://wordpress.org/support/users/timotheemoulin/)
 * (@timotheemoulin)
 * [6 years ago](https://wordpress.org/support/topic/open-basedir-restriction/)
 * Hello,
 * Your plugin wrongly register the admin menu by giving a full URL ([http://xxx](http://xxx))
   instead of only the admin relative url which leads to error on an install with
   open basedir restriction as the menu-header.php file use “file_exists” method
   during the admin menu setup.
 * Please update your plugin from
 *     ```
       app/Entities/AdminMenu/AdminSubmenu.php:49
       $submenu[$this->slug][50] = [$sub[$edit_key][0], $capability, esc_url(admin_url('admin.php?page=' . $this->slug))];
   
       app/Entities/AdminMenu/AdminSubmenu.php:49
       $submenu[$this->slug][$c] = [$item[0], $item[1], esc_url(admin_url($url))];
       ```
   
 * to
 *     ```
       app/Entities/AdminMenu/AdminSubmenu.php:49
       $submenu[$this->slug][50] = [$sub[$edit_key][0], $capability, esc_url('admin.php?page=' . $this->slug)];
   
       app/Entities/AdminMenu/AdminSubmenu.php:49
       $url = ( isset($item[3]) ) ? 'edit.php?post_type=' . $this->post_type->name . '&page=' . $item[2] : $item[2];
       ```
   
    -  This topic was modified 6 years ago by [Timothée Moulin](https://wordpress.org/support/users/timotheemoulin/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Timothée Moulin](https://wordpress.org/support/users/timotheemoulin/)
 * (@timotheemoulin)
 * [6 years ago](https://wordpress.org/support/topic/open-basedir-restriction/#post-12606288)
 * You need to remove the `admin_url()` wrapper to only provide the domain relative
   URL and not a full URL with http://
 *  Thread Starter [Timothée Moulin](https://wordpress.org/support/users/timotheemoulin/)
 * (@timotheemoulin)
 * [6 years ago](https://wordpress.org/support/topic/open-basedir-restriction/#post-12666808)
 * Fixed here : [https://github.com/kylephillips/wp-nested-pages/pull/281](https://github.com/kylephillips/wp-nested-pages/pull/281)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Open basedir restriction’ is closed to new replies.

 * ![](https://ps.w.org/wp-nested-pages/assets/icon-128x128.png?rev=1690043)
 * [Nested Pages](https://wordpress.org/plugins/wp-nested-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-nested-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-nested-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-nested-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-nested-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-nested-pages/reviews/)

## Tags

 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [open_basedir](https://wordpress.org/support/topic-tag/open_basedir/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 2 replies
 * 1 participant
 * Last reply from: [Timothée Moulin](https://wordpress.org/support/users/timotheemoulin/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/open-basedir-restriction/#post-12666808)
 * Status: resolved