I created a one-click digitalocean wordpress droplet. Wordpress has been setup, but I am unable to upload a theme that is about 45mb.

I keep getting the error: The link you followed has expired. Please try again.

I have followed this article to update the php.ini file and even created a .htaccess file, but the issue persists.

Please I need help figuring out how to resolve this.

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.

Submit an Answer
1 answer

Hi, @davidessienshare

This is most likely related to 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 try the first two methods.

Let me know if you have any questions.


  • Hi @alexdo Thanks for your response. The values you listed for the php.ini file and the ones for the .htaccess are the exact ones I set except for my max_execution time being set to 600

    • This is the content of the .htaccess file in the root directory of Wordpress:

      # BEGIN WordPress
      RewriteEngine On
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
      RewriteBase /
      RewriteRule ^index\.php$ - [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]
      php_value upload_max_filesize 128M
      php_value post_max_size 128M
      php_value max_execution_time 600
      php_value max_input_time 600
      # END WordPress