Report this

What is the reason for this report?

Can't upload wordpress theme.

Posted on August 15, 2020

Hello, why can’t I upload a theme to my WordPress site? I’ve changed the filesizes but I can only upload a child theme but I get an error “The link you followed has expired. Please try again.” when uploading the parent theme. Please help.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
0

Accepted Answer

Hi, @brianallen714

This is most likely related with the maximum upload file size value. Can you confirm which is the current value set on your end? You should see the value listed on the upload page in the WordPress admin area bellow the Upload New Media window.

You can either increase the limit via php.ini file , the .htaccess or via the functions.php file

  1. Via php.ini
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300
  1. Via the theme’s functions.php
@ini_set( 'upload_max_size' , '120M' );
@ini_set( 'post_max_size', '120M');
@ini_set( 'max_execution_time', '300' );
  1. Via .htaccess
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300

The .htaccess file method is less used and I’ll recommend you to try the first two methods.

Let me know if you have any questions.

Regards, Alex

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.