{"id":105,"date":"2023-11-08T00:51:11","date_gmt":"2023-11-08T06:51:11","guid":{"rendered":"http:\/\/knowledge.balamsoftware.net:8060\/?p=105"},"modified":"2023-11-08T00:51:12","modified_gmt":"2023-11-08T06:51:12","slug":"aumentar-el-limite-de-upload-en-php-para-wordpress-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/knowledge.balamsoftware.net\/?p=105","title":{"rendered":"Aumentar el l\u00edmite de upload en PHP para WordPress &#8211; Ubuntu 22.04"},"content":{"rendered":"\n<p> Trabajando con Apache debes modificar el archivo php.ini de la siguiente forma:<\/p>\n\n\n\n<p>$sudo nano \/etc\/php\/8.1\/apache2\/php.ini<\/p>\n\n\n\n<p>Las variables que habr\u00eda que modificar para aumentar el l\u00edmite ser\u00edan las siguientes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>upload_max_filesize = 2M<br>post_max_size = 8M<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>upload_max_filesize<\/strong>: Deber\u00e1s modificar 2M por el tama\u00f1o m\u00e1ximo deseado en MB o en Gigas.<\/li>\n\n\n\n<li><strong>post_max_size<\/strong>: Deber\u00e1s modificar 8M por el tama\u00f1o m\u00e1ximo deseado en MB + tama\u00f1o del formulario PHP.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"821\" height=\"288\" src=\"http:\/\/knowledge.balamsoftware.net:8060\/wp-content\/uploads\/2023\/11\/image-1.png\" alt=\"\" class=\"wp-image-106\" srcset=\"https:\/\/knowledge.balamsoftware.net\/wp-content\/uploads\/2023\/11\/image-1.png 821w, https:\/\/knowledge.balamsoftware.net\/wp-content\/uploads\/2023\/11\/image-1-300x105.png 300w, https:\/\/knowledge.balamsoftware.net\/wp-content\/uploads\/2023\/11\/image-1-768x269.png 768w\" sizes=\"auto, (max-width: 821px) 100vw, 821px\" \/><\/figure>\n\n\n\n<p>Una vez realizados los cambios, guarda y sal del archivo. Hay que reiniciar el servicio web del Servicio apache, normalmente se puede hacer con el comando:<\/p>\n\n\n\n<p>$sudo \/etc\/init.d\/apache2 restart<\/p>\n\n\n\n<p>o bien:<\/p>\n\n\n\n<p>$sudo systemctl restart apache2<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"736\" height=\"42\" src=\"http:\/\/knowledge.balamsoftware.net:8060\/wp-content\/uploads\/2023\/11\/image-2.png\" alt=\"\" class=\"wp-image-107\" srcset=\"https:\/\/knowledge.balamsoftware.net\/wp-content\/uploads\/2023\/11\/image-2.png 736w, https:\/\/knowledge.balamsoftware.net\/wp-content\/uploads\/2023\/11\/image-2-300x17.png 300w\" sizes=\"auto, (max-width: 736px) 100vw, 736px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Trabajando con Apache debes modificar el archivo php.ini de la siguiente forma: $sudo nano \/etc\/php\/8.1\/apache2\/php.ini Las variables que habr\u00eda que modificar para aumentar el l\u00edmite ser\u00edan las siguientes: upload_max_filesize = 2Mpost_max_size = 8M upload_max_filesize: Deber\u00e1s modificar 2M por el tama\u00f1o m\u00e1ximo deseado en MB o en Gigas. post_max_size: Deber\u00e1s modificar 8M por el tama\u00f1o m\u00e1ximo &hellip;<\/p>\n","protected":false},"author":1,"featured_media":108,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-105","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-servidores_linux"],"_links":{"self":[{"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=\/wp\/v2\/posts\/105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=105"}],"version-history":[{"count":1,"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=\/wp\/v2\/posts\/105\/revisions"}],"predecessor-version":[{"id":109,"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=\/wp\/v2\/posts\/105\/revisions\/109"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=\/wp\/v2\/media\/108"}],"wp:attachment":[{"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/knowledge.balamsoftware.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}