Exceed upload limit and install wordpress manually

We know that there is an upload limit on hosts provided by ifastnet:
https://forum.infinityfree.com/t/maximum-file-upload-size/
this limit causes you to not be able to install many themes and plugins in wordpress, not only that, but you cannot install many software, for example, the zipped version of xenforo software is over 10mb. Although wordpress software is provided to download with the Softaculous tool, Softaculous does not include many tools and offers the old version of wordpress. For this reason, I do not support using it. There is a way to download and install things over this limit. php code below

<?php
// generate the url of the wordpress version to download
$wordpressVersion = 'latest'; // you can write a specific version here if you want
$downloadURL = "https://wordpress.org/$wordpressVersion.zip";
// specify the destination folder where the file will be saved
$targetDirectory = './'; // the root directory of your server or the path to the folder where you want to upload
// download the file and save it in the destination folder
$zipFile = file_get_contents($downloadURL);
if ($zipFile !== false) {
    $targetFile = $targetDirectory . '/' . basename($downloadURL);
    // save the file
    if (file_put_contents($targetFile, $zipFile) !== false) {
        // download successful
        echo "wordpress has been successfully downloaded and saved in the $targetDirectory folder";
    } else {
        // failed to save the file
        echo "we could not save the file";
    }
} else {
    // download failed
    echo "there was an error downloading wordpress";
}

i tried this code and saved the last zip file of wordpress to the server. i tried the same in joomla and drupal and also in phpbb software and it worked. you can use this code https://github.com/ndeet/unzipper/blob/master/unzipper.php to extract the saved zip file. unzipper.php file to the server and extract the zip file. done! in the same way you can pull data from wordpress. org/themes/ and /plugins by editing the link in the code.
you can do this from any site that supports data extraction! all you need to do is edit the url.
**example pulling data **:
$downloadURL = “yoururl”;
I hope it works for you. you can also see that there is nothing damaging to the system by examining the codes.

The code does not seem to bypass the 10MiB rule in any way which means that the zip file will still get deleted even by using what you provided above.


The best recommendation I can give is to extract the ZIP file locally and then upload it using an FTP client such as FileZilla (Do not use InfinityFree's online FTP client for it)
3 Likes

you can try. yes we dont directly exceed the limit, but with this code we can save every file over 10mb to the server.

Do you have proof for this?

1 Like

I saved a 200mb file from https://testfiledownload.com/ to the server. this is the proof: Imgur: The magic of the Internet

filezilla: Imgur: The magic of the Internet Imgur: The magic of the Internet

this will take a very long time. for example there are more than 10000 elements in wordpress and file zilla will load them one by one. With this method, the data extraction part took 5 seconds at most and unzipping the file took 30 seconds.

As interesting as it seems, being able to store files over 10MiB on this hosting is an unintended behavior and may get patched in future.

Reason why such limit exists is to prevent people from using the hosting for file storage which is prohibited and being able to upload larger than that defeats the whole thing.

And unzipping large files server sides definitelly abuses it since it keeps the server busy unzipping one big single file.

7 Likes

This file is most likely going to get automatically deleted, so I wouldn’t recommend this method, either.

5 Likes

i understand. after uploading these files I didnt wait long but I managed to install it on my drupal server because after extracting the zip i didnt need the zip file and I deleted it myself. for now it works for me.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.