• Resolved 1brendan

    (@1brendan)


    I’ve been working on this site for a while now for my company. It’s through the Bitnami WordPress application running on an AWS EC2 instance.

    Yesterday I was tweaking some backend settings to allow a plugin to display more images and I changed both the htaccess file and also added a php.ini file to increase memory limit. I think the php.ini file may have existed in a different section of the file directory so the one I added may be a duplicate and is located in a different folder entirely.

    After adding the php.ini file I lost access to the site dashboard completely and can only get a HTTP ERROR 500 page. I didn’t have SSH access so I created a new Instance and attached the volume containing the site to it so now I can SSH into the site at least but don’t know what commands to run from here.

    The site was backed up via the plugin UpDraft but when I downloaded the backup zips from the S3 bucket they upload to the site wasn’t restored so I’m not sure what to do. Any help is greatly appreciated, thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • cleancoded

    (@cleancoded)

    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 default theme for your version of WordPress to rule-out a theme-specific issue. If you don’t have access to your admin panel, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, 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 SFTP or FTP, or a file manager in your hosting account’s control panel, and rename the .htaccess file. If you can’t find a .htaccess file, make sure that you have set your SFTP or FTP 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.

    Thread Starter 1brendan

    (@1brendan)

    Thanks, I read that reply to others with a similar issue but wasn’t able to apply it to my situation. The site is setup via Amazon Web Services, hosted on an EC2 instance. Do you know the command to disable htaccess as well as plugins using SSH?

    cleancoded

    (@cleancoded)

    I would just access your EC2 server via SFTP and rename the /wp-content/plugins folder and the .htaccess file.

    To do this, I would use Filezilla:

    1. Edit (Preferences) > Settings > Connection > SFTP, Click “Add key file”
    2. Browse to the location of your .pem file and select it.
    3. A message box will appear asking your permission to convert the file into ppk format. Click Yes, then give the file a name and store it somewhere.
    4. If the new file is shown in the list of Keyfiles, then continue to the next step. If not, then click “Add keyfile…” and select the converted file.
    5. File > Site Manager > Add a new site with the following parameters:

      Host: Your public dns name of ec2 instance, or the public ip address of the server

      Protocol: SFTP

      Logon Type: Normal

      User: From the docs: “For Amazon Linux, the default user name is ec2-user. For RHEL5, the user name is often root but might be ec2-user. For Ubuntu, the user name is ubuntu. For SUSE Linux, the user name is root. For Debian, the user name is admin. Otherwise, check with your AMI provider.”

    Then, press the connect button – If saving of passwords has been disabled, you will be prompted that the logon type will be changed to ‘Ask for password’. Say ‘OK’ and when connecting, at the password prompt push ‘OK’ without entering a password to proceed past the dialog.

    Note: FileZilla automatically figures out which key to use. You do not need to specify the key after importing it as described above.

    Thread Starter 1brendan

    (@1brendan)

    You’ve saved my life! Thank you so much, that worked perfectly. It turns out it wasn’t the .htaccess but instead the wp-config file was causing the issue. I renamed it and uploaded a backup and the site is back online. You sir, are gentleman and a scholar, thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I broke my site, HTTP ERROR 500’ is closed to new replies.