DEV3 Technologies home

DEV3 Developer Forum

How do I install a WordPress theme from a zip file, and why does the upload fail?

WordPress helpSolved0 views
dev3 ·

I bought a theme and downloaded a zip. In Appearance > Themes > Add New > Upload Theme I get "The package could not be installed" or "Are you sure you want to do this?". What am I doing wrong?

#wordpress#themes#upload

0

1 reply

dev3 · Accepted answer

Most failures come from three causes: the wrong zip, an upload size limit, or a file permission problem.

1. You uploaded the wrong zip. Marketplaces often ship a package containing the theme zip plus documentation and demo files. Unzip the download on your computer and upload only the inner file that contains style.css at its first level. If the zip contains a folder that contains another zip, that inner one is the installable theme.

2. Upload size limit. "Are you sure you want to do this?" usually means PHP rejected the file because it is larger than upload_max_filesize or post_max_size. See Tools > Site Health > Info > Server for the current values. Raise them (see the topic about upload size limits) or install by FTP.

3. Manual install by SFTP. Unzip locally and upload the theme folder to:

wp-content/themes/your-theme-folder/

Then activate it in Appearance > Themes. With WP-CLI:

wp theme install /path/to/theme.zip --activate

Other causes

  • Folder permissions: wp-content/themes must be writable by the web server user, otherwise WordPress asks for FTP credentials.
  • A security plugin or host firewall blocking the upload request (check the host error log).
  • A theme with the same folder name already exists. Delete the old one first or rename the folder.

If the theme needs a parent theme, install the parent as well, otherwise activation fails with "The parent theme is missing".

0

Your reply

Every post is reviewed by DEV3 before it appears. Usually reviewed within 24 hours.

Markdown supported. Use ``` for code blocks. Images are not allowed.