Title: Cannot add user fields
Last modified: August 22, 2016

---

# Cannot add user fields

 *  Resolved [Knut Sparhell](https://wordpress.org/support/users/knutsp/)
 * (@knutsp)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/cannot-add-user-fields/)
 * Your plugin fails here, most notably fails to add user fields (status 500 Internal
   server error) even before I have tried to use it for real. I found the reason.
   My `wp-config.php` is not located where you assume it to be.
 * A plugin cannot know where to find wp-config.php. It may be either in the root
   folder or the folder above it. Including `wp-config.php` is always wrong. To 
   load WordPress from a plugin file, and axjax handler, like `php/add_field.php`
   you may use `wp-load.php`, even if such a way to implement ajax is also bad.
 * Please substitute
    ` require_once(“../../../../wp-config.php”); with `require_once("../../../../
   wp-load.php");`
 * But to do it properly read this
    [http://solislab.com/blog/5-tips-for-using-ajax-in-wordpress/](http://solislab.com/blog/5-tips-for-using-ajax-in-wordpress/)
 * [https://wordpress.org/plugins/wpsc-support-tickets/](https://wordpress.org/plugins/wpsc-support-tickets/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [jquindlen](https://wordpress.org/support/users/jquindlen/)
 * (@jquindlen)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/cannot-add-user-fields/#post-5175554)
 * Most of that was addressed in the 4.7.24 update, but there are still a couple
   of files that I need to rewrite a bit in order to fully remove the require_once
   nonsense.

Viewing 1 replies (of 1 total)

The topic ‘Cannot add user fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wpsc-support-tickets_3eaded.svg)
 * [IDB Support Tickets](https://wordpress.org/plugins/wpsc-support-tickets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpsc-support-tickets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpsc-support-tickets/)
 * [Active Topics](https://wordpress.org/support/plugin/wpsc-support-tickets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpsc-support-tickets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpsc-support-tickets/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [jquindlen](https://wordpress.org/support/users/jquindlen/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/cannot-add-user-fields/#post-5175554)
 * Status: resolved