• 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

    (@macmanx)

    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 (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, 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.

    +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

    (@macmanx)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Server error 500 after adding a function’ is closed to new replies.