Title: Server error 500 after adding a function
Last modified: August 30, 2016

---

# Server error 500 after adding a function

 *  [AlluringBeauty](https://wordpress.org/support/users/alluringbeauty/)
 * (@alluringbeauty)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/server-error-500-after-adding-a-function/)
 * I was adding a function to create more sidebars so i can customize them for specific
   pages of my site. After saving this i went to check if it worked and started 
   seeing the server error 500 message. Is there a way I can edit this file back
   from the cpanel? I tried to log into FTP but it also says failed to connect to
   server. My site is stellafoxx.com. Also is there a way i can set up a test site
   so that when i make edits in the future i can see if they will crash the site
   before incorporating them into my actual site?

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

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/server-error-500-after-adding-a-function/#post-6784594)
 * Internal server errors (error 500) are often caused by plugin or theme function
   conflicts, so if you have access to your admin panel, try deactivating all plugins.
   If you don’t have access to your admin panel, try [manually resetting your plugins](https://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F)(
   no Dashboard access required). If that resolves the issue, reactivate each one
   individually until you find the cause.
 * If that does not resolve the issue, try switching to the Twenty Fifteen theme
   to rule-out a theme-specific issue. If you don’t have access to your admin panel,
   access your server via [FTP or SFTP](https://codex.wordpress.org/FTP_Clients),
   navigate to `/wp-content/themes/` and rename the directory of your currently 
   active theme. This will force the default theme to activate and hopefully rule-
   out a theme-specific issue.
 * If that does not resolve the issue, it’s possible that a `.htaccess` rule could
   be the source of the problem. To check for this, access your server via FTP or
   SFTP and rename the `.htaccess` file. If you can’t find a `.htaccess` file, make
   sure that you have set your FTP or SFTP client to view invisible files.
 * If you weren’t able to resolve the issue by either resetting your plugins and
   theme or renaming your .htaccess file, we may be able to help, but we’ll need
   a more detailed error message. Internal server errors are usually described in
   more detail in the server error log. If you have access to your server error 
   log, generate the error again, note the date and time, then immediately check
   your server error log for any errors that occurred during that time period. If
   you don’t have access to your server error log, ask your hosting provider to 
   look for you.
 *  [Digico Paris](https://wordpress.org/support/users/digico-paris/)
 * (@digico-paris)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/server-error-500-after-adding-a-function/#post-6784596)
 * +1 to all James said,
 * I have no instant solution in mind, but in the future, always keep backups of
   your working WordPress environment to prevent that kind of issues.
 * A pro about working directly on files is also you can always hit “undo” and reupload
   files (not for for the database, of course).
 * For example, plug your development folder to a free Google Drive, Dropbox or 
   whatever, to keep working versions at hand.
 * Git, SVN or alike can help too if you’re familiar.
 * Hope it helps,
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/server-error-500-after-adding-a-function/#post-6784604)
 * Handy guide for backups: [https://codex.wordpress.org/WordPress_Backups](https://codex.wordpress.org/WordPress_Backups)

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

The topic ‘Server error 500 after adding a function’ is closed to new replies.

## Tags

 * [Server Error 500](https://wordpress.org/support/topic-tag/server-error-500/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/server-error-500-after-adding-a-function/#post-6784604)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
