How to upload a ZIP file to your WordPress site?

The best and easiest way to make a video, image, or compressed zip folder downloadable on a WP website is to upload it on the server. When a site has been set up and is accessible on the browser, any file you upload to the root directory of the WP website can be downloaded to the PC.

If the file has a .html extension, the browser will open the HTML page and if it has .php extension, the web server will make PHP process the code. If the uploaded file is an image, the browser will display the image. Last week, we shared 2 methods to upload HTML files on WordPress. Today, we’ve covered three ways to upload a zip package to your WordPress site. Here are the methods:

SFTP method

SFTP is a powerful utility to transfer files from one PC to another over a network connection. To upload a zip package using this method, open the terminal and type this command sftp user_name@ip_address. In this command replace user_name with the server user name and ip_address with the server’s IP address.

How to find the IP address of a WP site? Well, you can use the ping tool to find the IP address of your server. Anyways, once you enter the command, press the keyboard’s enter key. Now, enter the password and type + run this command put your_zip_archive_name wp_directory_on_server. In this command, replace your_zip_archive_name with the name of your file and its extension and wp_directory_on_server with the path to the folder where you have installed WP. Once the package has been transferred, close the sftp connection by typing exit and pressing the enter key.

FTP method

Download and install an FTP client on your PC. Open the FTP client and connect it to the server. Open the directory on the server where WP has been installed. Now click on the ZIP file you want to upload and move it to the WP directory. Done! Now, close the FTP connection.

Using the built-in WordPress installer

The WP content management system comes with a powerful file uploader utility. Although this utility is meant to be used for uploading jpg, png, WebP images, or videos, you can use it to upload files of any type and size. Hosting companies may have set the maximum file size you can upload. If you change this value by editing the PHP configuration file, you can upload files of any size.

WordPress file uploader

When you upload a file with the WP uploader tool, WP will save it to the uploads folder. This folder is present in the wp-content directory. Even though this is the easiest method of uploading ZIP packages on WP, it has a drawback. If you use this method, the link to download the ZIP archive would look like domain/wp-content/uploads/2021/11/myzipfile.zip. If you want the URL like this, domain/myzipfile.zip, use method 1 or 2 instead of this one.

pramod
Pramod

Pramod is the founder of wptls. He has been using WordPress for more than nine years. He builds web applications, and writes about his experiences with various WP products on this site.

Leave a Reply

Your email address will not be published. Required fields are marked *