![]() In most cases, you don’t need to go higher than 10 to 20 MB for either setting. Now repeat the same process for post_max_size and upload_max_filesize, using a higher value for the former. You can also go higher if your computer has the resources for it, which shouldn’t be a problem with modern devices. Both 128 and 256 MB give your WordPress installation more than enough resources to execute any scripts or upload the files that you’ll need to use. Notice that the number is followed by a single “M” instead of an “MB”. To locate that directive, use your text editor’s search functionality and modify the value after the = sign. Here’s what that value looks like in our php.ini file: We recommend setting a memory limit of 128 or 256 MB. Go ahead and open it using your favorite text editor, and you’ll see something like this:Īs we explained in the last section, you need to look for the following three directives: Next, you can return to the conf directory and access the folder that correlates to that version. To double-check which version of PHP you’re using, open the MAMP control panel, go to MAMP > Preferences > PHP, and then look at the version number next to “Standard Version”:Ĭhecking which PHP version you’re using in MAMP. By default, your MAMP installation should use the latest PHP version, and you’ll want to access the folder that corresponds to it. If you navigate to the conf directory, you’ll notice that it includes several folders for different PHP versions. macOS: /Applications/MAMP/bin/php/phpx.x.x/conf/php.ini.You can access that file in one of these two locations, depending on whether you’re using Windows or macOS: ![]() To do so, you’ll need to edit your MAMP installation’s php.ini file. Modifying your PHP settings in MAMP is easy. We’ll also use the MAMP control panel to ensure that you updated your server settings successfully. How To Increase the Upload Size for Your Local MAMP Web Server (in 2 Steps)įor this tutorial, we’ll show you how to configure MAMP to increase its upload size on both Windows and macOS. As long as your PHP settings adhere to those guidelines, you should be golden. Likewise, memory_limit should have a higher value than post_max_size. The PHP documentation is clear when it indicates that your post_max_size setting should have a higher value than upload_max_filesize. Some tutorials tell you to only increase the upload_max_filesize setting within your PHP configuration. Seeking the perfect local development tool for your WordPress projects? DevKinsta is powerful, fast, and completely free. Whereas most web hosts will cap your PHP memory limit (within reason), there’s no forced cap with your local instance. However, since we’re talking about a local development environment, you have full freedom over how many resources to allocate to your setup. There’s no ideal PHP memory limit that suits every web server. If your PHP installation has a low memory limit, you’ll run into problems uploading files and executing scripts on your site. Therefore, all of these settings directly affect your website.
0 Comments
Leave a Reply. |