If you see the “The Link You Followed Has Expired” error on your WordPress site, it means something went wrong while trying to upload themes or plugins. This error usually happens because the server settings restrict the size of files you can upload or the time allowed for a process to complete. Here’s how you can fix it:
What Causes This Error?
This error generally occurs when server settings limit how big the files you can upload are or how long certain processes can run. These limits are set to protect your website but can sometimes be too strict.
How to Fix the Error
Here are several ways to resolve the “The Link You Followed Has Expired” error by changing server settings:
Method 1: Contact Your Hosting Provider
- Contact Support: If you’re not comfortable making changes yourself, reach out to your hosting provider’s support team. They can quickly help with server settings.
- Provide Details: Give them information about the error, including screenshots and a description of what you were trying to do when the error occurred. This helps them understand the issue better.
Method 2: Increase Limits in the functions.php File
- Install WPCode Plugin:
- Go to the WordPress dashboard and install the WPCode plugin.
- Add Code:
- Navigate to Code Snippets > + Add Snippet.
- Click “Use Snippet” and name your snippet. Choose “PHP Snippet” from the dropdown menu.
- Enter this code:
php
@ini_set('upload_max_size', '64M');
@ini_set('post_max_size', '64M');
@ini_set('max_execution_time', '300');
- This code increases the upload size to 64MB and the maximum execution time to 300 seconds.
- Save and Activate:
- Click “Save Snippet” and turn on the snippet.
This method is easy and keeps your changes safe even if you update your theme.
Method 3: Increase Limits Using cPanel
- Log into cPanel: Usually found at http://yourdomain.com/cpanel.
- Find PHP Settings:
- Go to the Software section and click on “Select PHP Version” or similar.
- Click on “Options” or “PHP Settings.”
- Update Settings:
- Increase the values for upload_max_filesize, post_max_size, and max_execution_time (e.g., 64M for file size and 300 for time).
- Check Changes:
- Go back to WordPress and try the action that caused the error.
This method is good for those who prefer not to edit code.
Method 4: Increase Limits in the .htaccess File
- Access .htaccess:
- Use an FTP client or File Manager in your hosting control panel to find the .htaccess file in your website’s root directory.
- Backup and Edit:
- Backup the file first. Then add these lines at the end:
plaintext
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
- Backup the file first. Then add these lines at the end:
- Save Changes:
- Save the file and close it.
Check your site again to see if the error is gone.
Method 5: Increase Limits in the php.ini File
- Find php.ini File:
- Use FTP or your hosting File Manager to locate the php.ini file in your WordPress root directory. If it’s missing, you can create one.
- Edit File:
- Open php.ini and add these lines:
plaintext
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
- Open php.ini and add these lines:
- Save and Restart:
- Save the file. You might need to restart your web server from your hosting control panel.
Check if the error is resolved by performing the same action.
Method 6: Update Your PHP Version
- Check Current PHP Version:
- Install a plugin like Display PHP Version or check in your hosting control panel.
- Ensure Compatibility:
- Make sure your site and plugins are compatible with a newer PHP version.
- Backup Your Site:
- Backup your site before making changes.
- Update PHP:
- In cPanel, go to the Software section and select “Select PHP Version.” Choose a newer version like PHP 7.4 or PHP 8.0.
- Test Your Site:
- Check for any issues after updating.
Keeping PHP up-to-date can fix errors and improve site performance.
Method 7: Check for Plugin Conflicts
- Deactivate All Plugins:
- Go to Plugins in your WordPress dashboard, select all, and deactivate them.
- Test the Error:
- Try the action that caused the error. If it works, a plugin is causing the issue.
- Reactivate Plugins:
- Reactivate plugins one by one and test each time to find the problematic one.
- Update or Replace Plugins:
- Look for updates or alternatives for any conflicting plugins.
By following these methods, you should be able to fix the “The Link You Followed Has Expired” error and keep your WordPress site running smoothly.