Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

wordpress on compute engine-how do i add space?

am trying to transfer my site to compute engine. I have already deployed a virtual machine but am having the issue of transferring it because of upload size limitations.I am using the all-in-one WordPress migration plugin to export and import the site to compute engine. my site is over 800 MB in size how do I increase the upload size?Import-‹-WordPress-on-Google-Compute-Engine-—-WordPress.png

Solved Solved
0 2 352
2 ACCEPTED SOLUTIONS

To increase the upload size limit for your WordPress site on Compute Engine, you'll need to make changes to the PHP configuration. Here's a step-by-step guide on how to accomplish this:

  1. Connect to your Compute Engine instance: Use an SSH client like PuTTY (for Windows) or Terminal (for macOS/Linux) to connect to your Compute Engine instance.

  2. Locate the PHP configuration file: Typically, the PHP configuration file is named php.ini and is located in the /etc/php/ directory. Use the following command to find the exact path: sudo find / -name php.ini

  3. Edit the PHP configuration file: Once you locate the php.ini file, open it in a text editor like nano or vi. For example: sudo nano /path/to/php.ini

  4. Find and adjust the upload size limit: Look for the following lines in the php.ini file: upload_max_filesize = 2M post_max_size = 8M

    Increase the values of upload_max_filesize and post_max_size to a suitable limit to accommodate your file size. For example: upload_max_filesize = 100M post_max_size = 100M

    Adjust the values according to your needs. Make sure to specify a value that can handle the size of your site backup (e.g., 800M).

  5. Save and close the file: After making the changes, save the php.ini file and exit the text editor.

  6. Restart the web server: To apply the changes, you'll need to restart the web server. Use the following command: sudo service apache2 restart

    If you're using a different web server like Nginx, replace apache2 with the appropriate service name.

  7. Test the increased upload size limit: Log in to your WordPress site and try the site migration again using the All-in-One WP Migration plugin. You should now be able to upload files of larger sizes.

Remember to revert the changes to the php.ini file after the migration process is complete to avoid unnecessarily large upload limits, as this can pose security risks.

View solution in original post

I just found a better and simpler solution to increase the WordPress upload limit on new installs. while researching. this article will help you with setting up WordPress on Google Cloud 

View solution in original post

2 REPLIES 2

To increase the upload size limit for your WordPress site on Compute Engine, you'll need to make changes to the PHP configuration. Here's a step-by-step guide on how to accomplish this:

  1. Connect to your Compute Engine instance: Use an SSH client like PuTTY (for Windows) or Terminal (for macOS/Linux) to connect to your Compute Engine instance.

  2. Locate the PHP configuration file: Typically, the PHP configuration file is named php.ini and is located in the /etc/php/ directory. Use the following command to find the exact path: sudo find / -name php.ini

  3. Edit the PHP configuration file: Once you locate the php.ini file, open it in a text editor like nano or vi. For example: sudo nano /path/to/php.ini

  4. Find and adjust the upload size limit: Look for the following lines in the php.ini file: upload_max_filesize = 2M post_max_size = 8M

    Increase the values of upload_max_filesize and post_max_size to a suitable limit to accommodate your file size. For example: upload_max_filesize = 100M post_max_size = 100M

    Adjust the values according to your needs. Make sure to specify a value that can handle the size of your site backup (e.g., 800M).

  5. Save and close the file: After making the changes, save the php.ini file and exit the text editor.

  6. Restart the web server: To apply the changes, you'll need to restart the web server. Use the following command: sudo service apache2 restart

    If you're using a different web server like Nginx, replace apache2 with the appropriate service name.

  7. Test the increased upload size limit: Log in to your WordPress site and try the site migration again using the All-in-One WP Migration plugin. You should now be able to upload files of larger sizes.

Remember to revert the changes to the php.ini file after the migration process is complete to avoid unnecessarily large upload limits, as this can pose security risks.

I just found a better and simpler solution to increase the WordPress upload limit on new installs. while researching. this article will help you with setting up WordPress on Google Cloud