WordPress shows 500 Internal Server Error during Scalia theme installation

Solution 1:

The issue is caused by a low file upload size limit. You can increase it in one of two ways:

Option 1: Set it directly in your PHP script

<?php
ini_set('upload_max_filesize', '<YOUR_VALUE_HERE>M');
ini_set('post_max_size', '<YOUR_VALUE_HERE>M');

Option 2: Use a .htaccess file
If the above doesn’t work, create or edit a .htaccess file in your site’s root directory and add:

php_value post_max_size <YOUR_VALUE_HERE>M
php_value upload_max_filesize <YOUR_VALUE_HERE>M

Solution 2:

To fix file upload and memory issues in WordPress:

1. Increase PHP memory limit in wp-config.php:

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

2. Increase upload limits in wp-config.php:

@ini_set('upload_max_filesize', '20M');
@ini_set('post_max_size', '13M');

Adjust the values to match your file size requirements.

3. Check .htaccess and file permissions:

  • Rename your existing .htaccess to .htaccess-old.
  • Create a new .htaccess file with default WordPress rules.

4. Use a default theme:

  • Switch to a default WordPress theme.
  • Then try reinstalling your theme (e.g., Scalia).

These steps ensure proper memory and upload settings while ruling out theme or file permission conflicts.