Title: wp_plugin_dir does not work
Last modified: February 10, 2019

---

# wp_plugin_dir does not work

 *  [kztab](https://wordpress.org/support/users/kztab/)
 * (@kztab)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/wp_plugin_dir-does-not-work-please-help/)
 * Hello,
 * I have installed WP 5.0.3 and checked with PHP 7.3 and 7.2 but I couldn’t make
   the change in wp-config work for WP_PLUGIN_DIR and WP-PLUGIN_URL It just doesn’t
   read any plugins in admin panel and doesn’t let me install any either. Please
   note that I renamed the directory on server to my desired folder name. This is
   the code I wrote in wp-config
 * define( ‘WP_SITEURL’, ‘[http://&#8217](http://&#8217); . $_SERVER[‘SERVER_NAME’].‘/
   test’ );
    define( ‘WP_HOME’, ‘[http://&#8217](http://&#8217); . $_SERVER[‘HTTP_HOST’].‘/
   test’ );
 * //define( ‘WP_PLUGIN_DIR’, dirname(__FILE__) . ‘/test/wp-content/newplugins’ );
   //
   define( ‘WP_PLUGIN_URL’, ‘[http://&#8217](http://&#8217); . $_SERVER[‘HTTP_HOST’].‘/
   test/wp-content/newplugins’ );
 * I have spent hours but couldn’t find a fix even online. Is this caused by new
   WP version or what? I checked with WP 4.9.9 but same result. Is this PHP 7.x 
   then? Because I have my other websites perfectly working using PHP 5.6 and older
   versions of WP. I need this done to ensure security so please advise.
 * Thank you.
    Tab

Viewing 1 replies (of 1 total)

 *  Thread Starter [kztab](https://wordpress.org/support/users/kztab/)
 * (@kztab)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/wp_plugin_dir-does-not-work-please-help/#post-11191123)
 * I mistakenly posted 2 lines of code commented, those are not commented in the
   actual wp-config.php file of course.

Viewing 1 replies (of 1 total)

The topic ‘wp_plugin_dir does not work’ is closed to new replies.

## Tags

 * [php7.3](https://wordpress.org/support/topic-tag/php7-3/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [kztab](https://wordpress.org/support/users/kztab/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/wp_plugin_dir-does-not-work-please-help/#post-11191123)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
