{"id":83930,"date":"2018-01-22T10:26:18","date_gmt":"2018-01-22T15:26:18","guid":{"rendered":"https:\/\/www.templatemonster.com\/help\/?p=83930"},"modified":"2018-02-13T09:42:48","modified_gmt":"2018-02-13T14:42:48","slug":"how-to-upload-large-images-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/how-to-upload-large-images-in-wordpress.html","title":{"rendered":"How to upload large images in WordPress"},"content":{"rendered":"<p>Have you tried to add large images to your WordPress website? The most likely you will get something like that &#8216;image_file_name.jpg exceeds the maximum upload size for this site&#8217;.<\/p>\r\n<p>Large images take a long time to load, this affects your site speed. A site with huge images is not ranked well by search engines.<\/p>\r\n<p>The best decision is to do an <a href=\"https:\/\/www.abetterlemonadestand.com\/optimizing-images-for-web\/\" target=\"_blank\" rel=\"nofollow\">image optimization<\/a>. You can easily resize and make your image larger without losing quality. <\/p>\r\n<p>We understand that this issue could be considered not a solution for you. We are going to show how to increase the memory limit.<\/p>\r\n<p>You hosting provider can set up certain file upload limit from their side. You can check this limit in your admin panel under the <strong>Media<\/strong> > <strong>Add New<\/strong> section.<\/p>\r\n\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2018\/01\/How_to_upload_large_images_in_WordPress.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/help\/wp-content\/uploads\/2018\/01\/How_to_upload_large_images_in_WordPress.jpg\" alt=\"\" width=\"625\" height=\"410\" class=\"alignnone size-full wp-image-83931\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2018\/01\/How_to_upload_large_images_in_WordPress.jpg 625w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2018\/01\/How_to_upload_large_images_in_WordPress-150x98.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2018\/01\/How_to_upload_large_images_in_WordPress-300x197.jpg 300w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a>\r\n<p>We will show you a few simple step steps that could help. To resolve this case you will need to increase upload maximum file size, post maximum size, and maximum execution time limits for your website.We strongly recommend you to contact your hosting provider and ask them to change those values for you. Otherwise, you can do the following:<\/p>\r\n<ol>\r\n<li>\r\n  <p>Edit <strong>functions.php<\/strong> file. That file usually located in your theme directory (<strong>wp-content\/themes\/themeXXX<\/strong>, where <em>themeXXX<\/em> is your theme name). You can access that file from your server. Connect to your server using FTP or hosting Cpanel. Add following code to the file:<\/p>\r\n  <pre>@ini_set( 'upload_max_size' , '64M' );\r\n@ini_set( 'post_max_size', '64M');\r\n@ini_set( 'max_execution_time', '300' );<\/pre>\r\n  <p>This solution may not work for some WordPress websites. In this case please try to edit the next files.<\/p>\r\n  <\/li>\r\n<li>\r\n  <p>In case you use Apache Web Server  feel free to edit server configuration file called <strong>.htaccess<\/strong>. Just change or add following code to your file:<\/p>\r\n  <pre>php_value upload_max_filesize 64M\r\nphp_value post_max_size 64M\r\nphp_value max_execution_time 300\r\nphp_value max_input_time 300<\/pre>\r\n  <\/li>\r\n<li>\r\n<p>If both methods didn&#8217;t work edit <strong>php.ini<\/strong> file. The php.ini file is where you declare changes to your PHP settings. This file could be <a href=\"https:\/\/www.siteground.com\/kb\/how_to_edit_hidden_system_files\/\" target=\"_blank\" rel=\"nofollow\">hidden<\/a>. Nevertheless, you can create an empty <strong>php.ini<\/strong> file with the following content:<\/p>\r\n<pre>upload_max_filesize = 64M\r\npost_max_size = 64M\r\nmax_execution_time = 300<\/pre>\r\n<p>Still no luck? Some providers block their users from changing these settings. Be sure to contact your provider and ask them to adjust settings for you.<\/p><\/li>\r\n<\/ol>\r\n<p>That is it! You know how to upload large images to WordPress now. We will show you more interesting hacks soon.<\/p>\r\n<p>We would also recommend you to view our premium <a href=\"https:\/\/www.templatemonster.com\/wordpress-themes.php\">WordPress Themes<\/a> in case you need a wider choice of website building solutions.<\/p>","protected":false},"excerpt":{"rendered":"<p>Have you tried to add large images to your WordPress website? The most likely you will get something like that &#8216;image_file_name.jpg exceeds the maximum upload size for this site&#8217;.<\/p>\n","protected":false},"author":55,"featured_media":83932,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2017,728],"tags":[2616,2232],"class_list":["post-83930","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monstroid-tutorials","category-wordpress-tutorials","tag-large-image","tag-uploading-images"],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/83930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=83930"}],"version-history":[{"count":5,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/83930\/revisions"}],"predecessor-version":[{"id":84106,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/83930\/revisions\/84106"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/83932"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=83930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=83930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=83930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}