You hit update on a premium theme in wp-admin, wait two seconds, and get slapped with a bright red banner: Update Failed: Download failed. Unauthorized. It’s one of the most annoying errors in WordPress because it tells you almost nothing about what actually broke.
I ran into this on an old client site running WordPress 6.5. They had bought the theme legally on ThemeForest years back, but the official Envato Market plugin kept choking on the update zip. Fixing it took me down a rabbit hole of token permissions, stuck database transients, and an unexpected licensing mix-up. Here is how to fix it without pulling your hair out.

What Causes ‘Download Failed: Unauthorized’ in WordPress
The error means WordPress asked Envato’s CDN for a temporary download URL, and Envato shot back an HTTP 401 Unauthorized response. WordPress doesn’t log the specifics on screen; it just spits out whatever raw message came back from the download stream.
Under the hood, the Envato Market plugin handles updates in two steps. First, it hits api.envato.com to check your purchase history against the latest available release. Second, when you click update, it requests a secure, pre-signed download link for the installable ZIP.
The failure usually boils down to one of these culprits:
- Missing token scopes: You generated your personal token without checking the actual download permissions on Envato’s developer portal.
- Stale WordPress transients: WordPress caches failed API responses in the
wp_optionstable for hours. Even if you fix your API token, the dashboard keeps showing you the old cached error. - Envato Elements vs. ThemeForest: The theme came from an Envato Elements subscription, but you’re using the Envato Market plugin (which only works with individual marketplace purchases).
- Revoked or expired tokens: If you reset your Envato account password or cleaned up old sessions, your token died silently.
- Outbound firewall or cURL issues: Your web host blocks outbound HTTPS calls or has an ancient CA root bundle that rejects Envato’s TLS cert.
Step 1: Reissue Your Envato API Token with Exact Permissions
Nine times out of ten, the token is missing a required scope. People go to Envato’s Developer Portal and either check only the first box or check every single box on the screen—both of which cause auth headaches.
Log in with the account that actually bought the theme and head to the token generator:
- Go to
build.envato.com/create-token. - Give it an identifiable name like
Production-Client-Updates. - Check these three permissions—and only these three:
- View and search Envato sites (product lookups)
- Download your purchased items (pulling the update file)
- List purchases you’ve made (verifying account ownership)
Do not check “Verify purchases you’ve made”. That permission is meant for theme authors building license verifiers for their customers, not buyers downloading updates.
Copy the token immediately. Envato won’t show it to you again once you leave the screen. Drop it temporarily in a password manager.
Step 2: Test Your Token with cURL Before Touching WordPress
Don’t bother pasting the key into wp-admin yet. Test it directly from your terminal first. This takes two seconds and confirms whether your token is valid and whether your server can even reach Envato’s API.
SSH into your host (or just run this locally):
curl -i -H "Authorization: Bearer YOUR_ENVATO_TOKEN_HERE" https://api.envato.com/v3/market/buyer/purchasesCheck the headers at the top. You want to see HTTP/2 200 or HTTP/1.1 200 OK, followed by JSON listing your purchased items:
{ "purchases": [ { "item": { "id": 2833226, "name": "Avada | Website Builder For WordPress & WooCommerce" }, "code": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } ]
}If you get "error": 401, the token is bad or the scopes didn’t stick. If the request hangs or times out, your host’s firewall is blocking outbound connections to api.envato.com.
You can also check if the download scope works for your specific item. Swap out 12345678 with your theme’s marketplace item ID:
curl -i -H "Authorization: Bearer YOUR_ENVATO_TOKEN_HERE" "https://api.envato.com/v3/market/buyer/download?item_id=12345678&shorten_url=true"If that returns a JSON object with a signed download_url, your token is 100% fine. The problem is sitting inside WordPress.
Step 3: Clear Stale Envato Transients from the Database
This is the trap that cost me the most time: once the Envato Market plugin hits a 401, WordPress caches that failure. Even after you update the token under Envato Market > Settings, clicking update keeps failing because WordPress refuses to re-query the API for another 6 to 12 hours.
You have to dump those transients manually. If you have WP-CLI, it’s a one-liner:
wp transient delete --all
wp site-transient delete update_themes
wp site-transient delete update_pluginsIf you don’t have WP-CLI, hop into phpMyAdmin or your MySQL console and run this query against your wp_options table:
DELETE FROM wp_options WHERE option_name LIKE '%_transient_envato_market_%' OR option_name LIKE '%_transient_timeout_envato_market_%' OR option_name = '_site_transient_update_themes' OR option_name = '_site_transient_update_plugins';If you use a custom table prefix instead of wp_, adjust the query to match. If your options table is bloated with leftover garbage, check out our guide on how to clean up bloated wp_options autoload data with WP-CLI.
Once you’ve cleared the transients, head back to wp-admin, open Dashboard > Updates, and click Check Again. That forces WordPress to make a clean API handshake.
Step 4: Check for the Envato Elements vs. ThemeForest Catch
I see this constantly on sites handed off by past agencies or freelancers. The theme was originally downloaded from an Envato Elements subscription, but someone installed the Envato Market plugin expecting automatic updates.
They are two completely different products:
- ThemeForest / CodeCanyon (Envato Market): Individual licenses. Each purchase gives you an item purchase code and API access via personal tokens.
- Envato Elements: An unlimited subscription. It does not grant individual purchase codes or API-based updates through the Envato Market plugin.
If the theme came from Elements, the marketplace API checks your account, finds no purchase record for that item ID, and returns a 401 Unauthorized.
To check, log into ThemeForest and look at your Downloads tab. If the theme isn’t there, your account doesn’t own a standalone license. You’ll either have to buy a regular license on ThemeForest or update manually by downloading the new zip from Elements. If you’re shopping for a replacement theme, read our guide on how to audit and choose an Envato WordPress theme before buying.
Step 5: Fix Server-Side Outgoing Connection Blocks
Sometimes your token is fine, but your server can’t finish the TLS handshake with Envato. Strict egress firewall rules, mod_security, or an outdated OpenSSL cert bundle will kill the request right as the download starts.
To see if WordPress itself can make outbound requests cleanly, run this quick check via WP-CLI eval or in a scratch file:
wp eval '$response = wp_remote_get("https://api.envato.com"); if (is_wp_error($response)) { echo $response->get_error_message(); } else { echo "HTTP Status: " . wp_remote_retrieve_response_code($response); }'If you see cURL error 60: SSL certificate problem: unable to get local issuer certificate, your server’s CA bundle is either missing or severely outdated. You can point PHP to a fresh cacert.pem in your php.ini:
curl.cainfo = "/etc/ssl/certs/ca-certificates.crt"
opennssl.cafile = "/etc/ssl/certs/ca-certificates.crt"If you’re on shared hosting without php.ini access, open a ticket with your host so they can update their system CA certs. For similar backend environment snags, take a look at our walkthrough on fixing missing PHP extensions and directory permissions.
Step 6: Handle Single-Item Purchases with Token + Item ID Pairing
If your Envato account has dozens of purchases, the plugin can time out trying to process the entire list. That giant JSON response can exceed PHP’s memory limit or execution time during the update check.
The plugin actually has a built-in workaround for this: Single Use Items. Instead of pulling your entire catalog, it checks just the item you specify:
- In wp-admin, go to Envato Market > Settings.
- Scroll down to the Single Use Items box.
- Click Add Item.
- Paste your token.
- Enter the theme’s numeric Item ID (grab this straight from the ThemeForest product URL, like
themeforest.net/item/theme-name/12345678). - Save changes.
This bypasses the broad buyer/purchases endpoint and fetches data only for that specific theme, sidestepping memory limits and timeout bugs.
Fallback: Update the Theme Manually Without Losing Customizations
If you’re staring down a deadline and just need the update pushed right now, do it manually. A lot of people panic here thinking an update will wipe their site. As long as you didn’t edit the parent theme’s core files directly, your menus, widgets, and Customizer options live in the database and won’t be touched.
Here is the safe way to do it through the dashboard:
- Log into ThemeForest, open your Downloads tab, and download Installable WordPress file only (not the big bundle with docs and PSDs).
- Go to Appearance > Themes > Add New > Upload Theme.
- Select the zip and click Install Now.
- WordPress will spot that the folder already exists and show a diff screen comparing the installed and uploaded versions.
- Click Replace active with uploaded.
If the upload fails with a file size or timeout error, your server limits are set too low. Follow our guide on how to install an Envato theme without timeouts to bump your upload and execution thresholds.
Prefer SFTP? Unzip the theme locally, rename the live theme folder on the server to themename-backup inside /wp-content/themes/, upload the new folder, verify the site loads, and delete the backup folder once you know it’s stable.
Frequently Asked Questions
Why did my token stop working after months of working fine?
Envato kills personal tokens if you change your account password, turn on 2FA, or revoke active sessions. It also happens if the theme author restructured licensing, or if the original purchase was refunded or hit with a chargeback.
Can I use one Envato API token across all my client sites?
Technically yes, but don’t do it. A master token stored in a client’s wp_options table is readable by any admin user on that site. If you must use agency licenses, use the Single Use Items setting or run updates in staging before deploying to production.
Does the ‘Unauthorized’ error affect my child theme?
No. Your child theme lives in its own folder (like /wp-content/themes/theme-child/) with its own style.css and functions.php. Theme updates only touch the parent directory. Your child theme files and database settings won’t be modified.
What if my theme was removed from ThemeForest?
Once an author pulls a theme or Envato delists it, the download API stops working. The plugin might still flag that an update exists if it has stale data, but the download link will throw a 401 or 404. You’ll need to reach out to the developer directly or look into switching themes.
Next Steps for Clean WordPress Deployments
Once your token is verified and updates run cleanly without 401s, make sure your staging workflow is locked down so you can test updates before pushing them live. If you need to set up a secure test bed, check out our guide on how to password protect WordPress staging on Nginx with HTTP basic auth.

