Skip to content

Instantly share code, notes, and snippets.

View savepong's full-sized avatar
:octocat:
savepong

Pongsiri Pisutakarathada savepong

:octocat:
savepong
View GitHub Profile

Increasing PHP Upload Limits in Docker WordPress

When working with WordPress in Docker, you may need to increase the default file upload size limits. Here are multiple methods to accomplish this:

Method 1: Using Custom php.ini File (Recommended)

This is the cleanest approach that persists through container restarts.

  1. Create a custom PHP configuration file:
@savepong
savepong / Setting Up EC2 Ubuntu ARM (Graviton) to Host Multiple Websites using Docker and Caddy.md
Last active April 3, 2025 17:07
Setting Up EC2 Ubuntu ARM (Graviton) to Host Multiple Websites with Docker and Caddy

These steps are specifically for ARM-based EC2 instances (AWS Graviton) to host multiple websites using Docker and Caddy.

Step 1: Launch and Configure ARM-based Ubuntu EC2 Instance

  1. Launch an ARM-based Ubuntu EC2 instance (use t4g, c6g, or m6g family with Ubuntu 22.04 LTS)
  2. Configure security groups:
    • Allow SSH (port 22)
    • Allow HTTP (port 80)
    • Allow HTTPS (port 443)
  3. Connect to your instance:
@savepong
savepong / drum-machine.markdown
Created February 18, 2021 17:38
Drum Machine
@savepong
savepong / index.html
Created February 15, 2021 15:23
Simple React Markdown Previewer
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<div id="app"></div>
@savepong
savepong / index.pug
Created February 3, 2021 16:23
Pure CSS iOS Icons
//pure css google analytics icon
h1 Pure CSS iOS Icons
.main-container
.container
.icon-container
.bar.bar-left
.bar.bar-middle
.bar.bar-right
h2 Analytics
.container
@savepong
savepong / freecodecamp-personal-portfolio.markdown
Created February 3, 2021 15:08
freeCodeCamp: Personal Portfolio
@savepong
savepong / index.html
Created December 14, 2020 09:29
Sample Multi Drag Code
<div id="app">
<v-app id="inspire">
<v-card
class="mx-auto"
tile
>
<draggable v-for="(item, index) in images"
v-model="images[index]"
group="image"
@savepong
savepong / index.html#myModal
Created May 27, 2019 15:13
เปิด Modal จากลิงค์ # ด้วย javascript
<script>
$(document).ready(function() {
if(window.location.href.indexOf('#myModal') != -1) {
$('#myModal').modal('show');
}
});
</script>
@savepong
savepong / checknumber.php
Created May 17, 2019 04:19
เช็คว่ามีเป็นตัวเลขใน string หรือไม่? และมีกี่ตัว?
$str = '183293819203';
preg_match_all('!\d!', $str, $numbers);
dd( count($numbers[0])==13 );
@savepong
savepong / foo.php
Created March 1, 2019 03:57
Content-Type is not allowed by Access-Control-Allow-Headers
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST,GET,OPTIONS');
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');