# Wordpress import file size

**URL:** <https://discuss.google.dev/t/wordpress-import-file-size/123454>\
**Category:** Compute Infrastructure\
**Tags:** google-cloud-vmware-engine-gcve\
**Created:** [June 16, 2023, 8:18am UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454 "2023-06-16T08:18:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [June 16, 2023, 8:18am UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/1 "2023-06-16T08:18:15Z")

</div>

_Hi,_  
_I am new to GCP and I just installed through WordPress deploy a Wordpress installation. Now I have problems with importing the files of my website. It says that I can only upload 2 MB. I have tried everything what I found here but nothing works well. Can someone help me with a not too technical guidance? I really would appreciate to know if I am doing everything._

---

<div class="post-metadata">

**Author:** ![Logicspace](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/logicspace/32/34107_2.png) [@Logicspace](https://discuss.google.dev/u/Logicspace)\
**Post date:** [June 16, 2023, 12:54pm UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/2 "2023-06-16T12:54:04Z")

</div>

To increase the file upload limit in WordPress on Google Cloud Platform (GCP), there are several methods you can try. Here are some steps you can follow:

1. **Check `wp-config.php` file** : The memory limits may be defined in your `wp-config.php` file. Open the file and search for lines that define the memory limits. The location of these limits may vary depending on your theme and WordPress configuration

2. **Modify `php.ini` file** : Another approach is to modify the `php.ini` file. This file contains various PHP configuration settings, including the file upload size limit. Here’s how you can do it:

- SSH into your GCP instance.
- Open the `php.ini` file for editing. If you’re using the Bitnami version of WordPress on GCP, you can access the `php.ini` file by executing the following command: `nano /opt/bitnami/php/etc/php.ini`.
- Search for the `upload_max_filesize` and `post_max_size` directives in the `php.ini` file. Update their values to the desired file upload size limit. For example, you can set them to `512M` for a 512 MB limit.
- Save the changes and exit the editor.
- Restart the Apache server for the changes to take effect. You can do this by executing the following command: `sudo /opt/bitnami/ctlscript.sh restart`

1. **Increase `upload_max_filesize` and `post_max_size` in `php.ini`** : In addition to modifying the `php.ini` file, you may also need to increase the `upload_max_filesize` and `post_max_size` values in the `php.ini` file. These values determine the maximum size of files that can be uploaded and the maximum size of POST data that PHP will accept, respectively. Make sure to update both values to the desired file upload size limit

2. **Use FTP/SFTP** : If you’re still unable to increase the file upload limit using the above methods, you can try uploading large files via FTP/SFTP. This method involves manually uploading the files to your WordPress installation using an FTP/SFTP client. Once the files are uploaded, you can use a plugin like “Add From Server” to import them into WordPress

It’s important to note that modifying server configuration files like `php.ini` requires administrative access to your GCP instance. If you’re using a managed WordPress solution on GCP, such as Bitnami, you may need to consult their documentation or support resources for specific instructions on increasing the file upload limit.

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [June 30, 2023, 6:45am UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/3 "2023-06-30T06:45:30Z")

</div>

I know the sure shot solution for this. Let me know if you are still looking for the same.

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [September 8, 2023, 7:30am UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/4 "2023-09-08T07:30:22Z")

</div>

Have tried all solutions. Nothing works when once uses Google Click to Deploy. found the location of loaded configuration file for php.ini, modified that and the server level php.ini file, but still no change. wp-config modification also doesn’t work.  
If any one was able to change it after having tried all I mentioned, please suggest.

---

<div class="post-metadata">

**Author:** ![pratyushFilter](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/pratyushfilter/32/27959_2.png) [@pratyushFilter](https://discuss.google.dev/u/pratyushFilter)\
**Post date:** [September 16, 2023, 11:37am UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/5 "2023-09-16T11:37:00Z")

</div>

Hey, do you have a solution for this?

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [September 16, 2023, 1:41pm UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/6 "2023-09-16T13:41:19Z")

</div>

Was able to make it work by making changes in the apache configuration file inside the cli folder. Depending on your server configuration, your file may be situated in a separate folder.  
Just insert a blank php file inside your root directory, name it user.php and see the file location displayed when you open the file.

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [October 3, 2023, 4:55pm UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/7 "2023-10-03T16:55:01Z")

</div>

try command **sudo nano /etc/php/8.1/fpm/php.ini** then change limit.

then restart **sudo service php8.1-fpm** restart after changing upload limits

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [November 22, 2023, 6:14pm UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/8 "2023-11-22T18:14:06Z")

</div>

To overcome the 2 MB upload limit on GCP WordPress, try these steps:

1. Use Cloud Storage: Upload your files to Google Cloud Storage and link them in your WordPress posts/pages.

2. Modify PHP Settings: Adjust your PHP settings in the `php.ini` file to increase the upload limit. Look for `upload_max_filesize` and `post_max_size`.

3. WordPress Plugins: Install a WordPress plugin like “Increase Maximum Upload File Size” to easily adjust upload limits within the WordPress dashboard.

4. Manual Uploads: If the above steps don’t work, manually upload large files using an FTP client to the appropriate directory on your server.

5. Consult Documentation: Refer to Google Cloud Platform and [WordPress](https://www.pakistanjobslatest.pk/) documentation for specific details and troubleshooting related to file uploads on GCP.

Remember to backup your site before making significant changes.

---

<div class="post-metadata">

**Author:** ![DaveRockNo20](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/daverockno20/32/997_2.png) [@DaveRockNo20](https://discuss.google.dev/u/DaveRockNo20)\
**Post date:** [January 16, 2024, 5:20pm UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/9 "2024-01-16T17:20:06Z")

</div>

THANK YOU, that’s the only thing that worked for me. I had the exact same problem, NOTHING would work. The only thing that worked was to modify the php.ini from the fpm folder AND restart with sudo service php8.1-fpm restart command. Why do we have to make the changes from that file specifically and why the regular restart command didn’t work that I don’t know.

---

<div class="post-metadata">

**Author:** ![JuanMR86](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@JuanMR86](https://discuss.google.dev/u/JuanMR86)\
**Post date:** [February 28, 2024, 4:18am UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/10 "2024-02-28T04:18:41Z")

</div>

Hey!! It really works for me. I have a VM created from a Wordpress template in GCP, for increase the max file size, just modify in /etc/php/8.1/fpm/php.ini file next parameters:

upload\_max\_filesize = xxxxM

post\_max\_size = xxxxM

Thanks for all your recomendations, and hope it works for everyone with the same issue.

---

<div class="post-metadata">

**Author:** ![joytom](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@joytom](https://discuss.google.dev/u/joytom)\
**Post date:** [April 5, 2024, 5:28pm UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/11 "2024-04-05T17:28:16Z")

</div>

If you don’t want coding, directly increase max upload size through this free plugin: [https://ziscom.in/how-to-increase-max-upload-size/](https://ziscom.in/how-to-increase-max-upload-size/)

After installation go to WordPress menu ‘Max Upload Size’ \* Only enter the numeric value in bytes \* 1024 bytes = 1KB \* 1048576 bytes = 1MB

It worked for me. Hope it help for you.

---

<div class="post-metadata">

**Author:** ![GA0LU](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@GA0LU](https://discuss.google.dev/u/GA0LU)\
**Post date:** [March 25, 2025, 6:55am UTC](https://discuss.google.dev/t/wordpress-import-file-size/123454/12 "2025-03-25T06:55:25Z")

</div>

[https://github.com/GA0LU/WPUpload-Unlocked-GCP.git](https://github.com/GA0LU/WPUpload-Unlocked-GCP.git) try this one
