{"id":34,"date":"2008-04-14T14:46:17","date_gmt":"2008-04-14T13:46:17","guid":{"rendered":"http:\/\/www.miscdebris.net\/blog\/?p=34"},"modified":"2009-12-04T11:51:03","modified_gmt":"2009-12-04T10:51:03","slug":"changing-the-php-file-upload-limit-in-ubuntu-linux","status":"publish","type":"post","link":"http:\/\/www.miscdebris.net\/blog\/2008\/04\/14\/changing-the-php-file-upload-limit-in-ubuntu-linux\/","title":{"rendered":"Changing the php file upload limit in Ubuntu Linux"},"content":{"rendered":"<p>If you have your own Ubuntu server running you may encounter the maximal file size upload limit in php scripts which is set to 2Mb as default. In order to change that we first have a look what the size actually is. In <code>\/var\/www<\/code> (standard www directory) create a file called <code>info.php<\/code> with the following content:<\/p>\n<pre>&lt;?php\r\n\/\/ Show all information, defaults to INFO_ALL\r\nphpinfo();\r\n?&gt;<\/pre>\n<p><!--more-->Then browse to this file via <code>http:\/\/localhost\/info.php<\/code> (replace localhost with the servername if necessary) and look for the line<\/p>\n<pre>upload_max_filesize 2M 2M<\/pre>\n<p>which will show you the actual maximum file size. In order to change that open a ssh connection to your server and edit the file <code>\/etc\/php5\/apache2\/php.ini<\/code> with<\/p>\n<pre>sudo nano \/etc\/php5\/apache2\/php.ini<\/pre>\n<p>search for &#8220;upload_max_filesize&#8221; with Ctrl-W and change &#8220;2M&#8221; to &#8220;20M&#8221;. Save the file with Ctrl-O and exit with Ctrl-X. Restart the apache server with<\/p>\n<pre>sudo \/etc\/init.d\/apache2 restart\r\n<\/pre>\n<p>and visit again <code>http:\/\/localhost\/info.php<\/code> to check if the maximum file size was changed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have your own Ubuntu server running you may encounter the maximal file size upload limit in php scripts which is set to 2Mb as default. In order to change that we first have a look what the size actually is. In \/var\/www (standard www directory) create a file called info.php with the following &hellip; <a href=\"http:\/\/www.miscdebris.net\/blog\/2008\/04\/14\/changing-the-php-file-upload-limit-in-ubuntu-linux\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Changing the php file upload limit in Ubuntu Linux<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[9,10],"tags":[11],"class_list":["post-34","post","type-post","status-publish","format-standard","hentry","category-linux","category-macosx","tag-ubuntu-server-php"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6pnj-y","_links":{"self":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts\/34"}],"collection":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":2,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":249,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts\/34\/revisions\/249"}],"wp:attachment":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}