Getting a 500 internal server error for wordpress?

I already tried doing the php.ini memory=20MB solution but it did not work. I uploaded it under the wp-admin/ folder.

I’m not really sure what else to try. Help?

Related posts

Leave a Reply

6 comments

  1. The memory bump doesn’t go into an .htaccess file in wp-admin. It goes into the .htaccess in web root. Use FTP to find and delete the .htaccess file you put in wp-admin.

    Then forget about .htaccess files and try adding the line below near the top of your wp-config.php file, a few lines after the opening <?php

    define('WP_MEMORY_LIMIT', '64M');

  2. This problem occurs because your php dont’t have any xml or has a deprecated version xml, so if you manually instal or update your xml, the problem will be solve.
    If you using Ubuntu, try execute this code in your terminal:

    sudo apt-get install php-xml
    

    After this you need to restart apache so it takes effect, for this execute the command:

    sudo service apache2 restart
    
  3. Go to setting -> permalink and then select any common setting after that save it.
    Reload the website. Everything will be fine.

    Then reset it to previous common setting so that it will not effect for URL.

  4. A 500 error is an Internal Server Error, which sometimes can be a hosting configuration problem, but in WordPress it is often a fatal PHP error.

    First, just remove that php.ini file – some web hosts do not allow you to modify the PHP settings, so let’s take that out of the mix first.

    If it is a server error, temporarily rename your .htaccess file to something else (to take it out of the mix as well). Also, check for an error_log file in your filesystem, or the Error Logs in your hosting control panel.

    If that doesn’t tell you anything, it is likely a PHP issue. Turn on WordPress Debugging by adding the following code to your wp-config.php file:

    // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    
    // Disable display of errors and warnings 
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );
    
    // Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
    define( 'SCRIPT_DEBUG', true );
    

    Make sure you comment out the line that says:

     define( 'WP_DEBUG', true );
    

    Now, when you refresh the page and get the error, WordPress will write any PHP errors to wp-content/debug.log. Check that log for a fatal PHP error – it will tell you which file is causing the error, often a theme or plugin file.

    Once you know the cause, rename that theme or plugin to temporarily remove it from WordPress. That should restore normal functionality.

  5. Another important fix for the internal server error is to try and upload a fresh version of wp-admin and wp-includes to your site.

    This step should be a last resort, but if you’ve used the above solutions and still cannot find one that works, it’s worth a try. Backup your site, and download a fresh version of WordPress from the main site.

    Extract the files from the ZIP file, and open the extracted folder. Open your site’s root directory in an FTP client, and upload the wp-admin and wp-includes from your fresh version of WordPress to your site’s directory, overwriting the older versions.

    Refresh the client, and refresh your site. If the error is gone, it was likely caused by a corrupted core file. If you still see the error, you may have no other option than to contact your host. Check it out for more WordPress internal server error fixes.