More fixes

WordPress says "The link you followed has expired" when you upload something

You pick a theme or plugin zip, a video or a big PDF, press Install or Upload, and instead of a progress bar you get a white page: "The link you followed has expired. Please try again." Nothing expired. The file is bigger than your host lets one upload be, so the server throws the upload away before WordPress sees it, and WordPress, finding the form arrived empty, falls back to its generic "expired link" message. Raise the host's limit or put the file on the server another way. Below is a rebuilt example (not a real client), then the safe order of steps.

What the owner sees after pressing Install Now

harborstreetbakery.example/wp-admin/update.php?action=upload-theme

What the checks found


  

First: is it the size, or a page left open too long?

Different things produce the same message, and one look tells them apart.

The safe order of steps

  1. Back up the files and the database (host's backup tool, or the file manager plus phpMyAdmin export) before changing server settings. Also download a copy of .htaccess and of any php.ini or .user.ini next to wp-config.php.
  2. Raise the limits in the host's control panel first. Four PHP settings decide it, and the first two must both be larger than your file:
    upload_max_filesize = 64M
    post_max_size       = 64M
    max_execution_time  = 300
    max_input_time      = 300
    On cPanel hosts this is "MultiPHP INI Editor" or "Select PHP Version", then Options. Many managed hosts have a "PHP settings" page instead. Pick a number a little above your biggest file rather than the largest the box allows. Then reload Media, Add New: the "Maximum upload file size" line should show the new number.
  3. If the panel has no such setting, create a file named .user.ini (or php.ini, whichever your host's help pages name) next to wp-config.php containing the four lines above. These files are re-read on a timer, so allow 5 minutes before testing.
  4. Only on hosts whose help pages say so, the same values can go in .htaccess as php_value upload_max_filesize 64M and so on. On most modern hosts that line is not allowed and the whole site answers "500 Internal Server Error". If that happens, delete exactly the lines you added and the site comes straight back.
  5. If you cannot raise the limit at all (some cheap plans cap it), skip the upload form. Unzip the theme or plugin on your computer and copy its folder into wp-content/themes/ or wp-content/plugins/ with the host's file manager or SFTP, then activate it from the dashboard. For video, upload it to YouTube or Vimeo and paste the link into the page: a big video served from your own site is slow for every visitor anyway.
  6. Test the upload that failed, then the home page, the contact or order form and the login in a private window.

Common causes and what each one needs

What you findWhat it meansUsual fix
Theme or plugin zip bigger than "Maximum upload file size"The upload is over upload_max_filesize / post_max_sizeRaise both in the control panel, or copy the unzipped folder by file manager
Limit already raised, big uploads still fail partwayThe upload takes longer than the time limitsRaise max_execution_time and max_input_time
"413 Request Entity Too Large" instead of the expired messageThe web server (often nginx) refuses before PHP is askedHost raises client_max_body_size
Whole site shows "500 Internal Server Error" after an editphp_value lines in .htaccess are not allowed on this hostRemove the added lines; use the panel or .user.ini instead
Once, after a page sat open for hoursThe page's security code expiredReload and save again
Visitors see it on a front-end formA cache is serving a stale copy of the form pageExclude that page from caching, purge

What not to do

If you can reach the control panel, the steps above are usually enough. If the site broke while you were trying, or you need the new theme or plugin in today, that is what the box below is for. Related: a "critical error on this website" after the upload finally works means the new theme or plugin itself is the problem, and a blank white page is the same thing with the message hidden.