[{"data":1,"prerenderedAt":798},["ShallowReactive",2],{"navigation":3,"/docs/framework-guides/wordpress/using-wordpress-with-docker":221,"/docs/framework-guides/wordpress/using-wordpress-with-docker-surround":793},[4],{"title":5,"path":6,"stem":7,"children":8},"Docs","/docs","docs",[9,12,56,85,132,153,178,195,208],{"title":10,"path":6,"stem":11},"","docs/index",{"title":13,"path":14,"stem":15,"children":16,"icon":55},"Getting Started","/docs/getting-started","docs/1.getting-started/1.index",[17,19,23,27,31,35,39,43,47,51],{"title":18,"path":14,"stem":15},"Introduction",{"title":20,"path":21,"stem":22},"Container Basics","/docs/getting-started/container-basics","docs/1.getting-started/2.container-basics",{"title":24,"path":25,"stem":26},"Installation","/docs/getting-started/installation","docs/1.getting-started/3.installation",{"title":28,"path":29,"stem":30},"These Images vs Others","/docs/getting-started/these-images-vs-others","docs/1.getting-started/4.these-images-vs-others",{"title":32,"path":33,"stem":34},"Choosing an Image","/docs/getting-started/choosing-an-image","docs/1.getting-started/5.choosing-an-image",{"title":36,"path":37,"stem":38},"Default Configurations","/docs/getting-started/default-configurations","docs/1.getting-started/6.default-configurations",{"title":40,"path":41,"stem":42},"Upgrade Guide","/docs/getting-started/upgrade-guide","docs/1.getting-started/7.upgrade-guide",{"title":44,"path":45,"stem":46},"Changelog","/docs/getting-started/changelog","docs/1.getting-started/8.changelog",{"title":48,"path":49,"stem":50},"About","/docs/getting-started/about","docs/1.getting-started/9.about",{"title":52,"path":53,"stem":54},"Contributing","/docs/getting-started/contributing","docs/1.getting-started/99.contributing",false,{"title":57,"path":58,"stem":59,"children":60,"page":55},"Image Variations","/docs/image-variations","docs/2.image-variations",[61,65,69,73,77,81],{"title":62,"path":63,"stem":64},"CLI","/docs/image-variations/cli","docs/2.image-variations/cli",{"title":66,"path":67,"stem":68},"FPM","/docs/image-variations/fpm","docs/2.image-variations/fpm",{"title":70,"path":71,"stem":72},"FPM-Apache","/docs/image-variations/fpm-apache","docs/2.image-variations/fpm-apache",{"title":74,"path":75,"stem":76},"FPM-NGINX","/docs/image-variations/fpm-nginx","docs/2.image-variations/fpm-nginx",{"title":78,"path":79,"stem":80},"FrankenPHP","/docs/image-variations/frankenphp","docs/2.image-variations/frankenphp",{"title":82,"path":83,"stem":84},"Unit (Deprecated)","/docs/image-variations/unit","docs/2.image-variations/unit",{"title":86,"path":87,"stem":88,"children":89,"page":55},"Framework Guides","/docs/framework-guides","docs/3.framework-guides",[90,123],{"title":91,"icon":55,"defaultOpen":55,"path":92,"stem":93,"children":94,"page":55},"Laravel","/docs/framework-guides/laravel","docs/3.framework-guides/1.laravel",[95,99,103,107,111,115,119],{"title":96,"path":97,"stem":98},"Automations","/docs/framework-guides/laravel/automations","docs/3.framework-guides/1.laravel/1.automations",{"title":100,"path":101,"stem":102},"Task Scheduler","/docs/framework-guides/laravel/task-scheduler","docs/3.framework-guides/1.laravel/2.task-scheduler",{"title":104,"path":105,"stem":106},"Queue","/docs/framework-guides/laravel/queue","docs/3.framework-guides/1.laravel/3.queue",{"title":108,"path":109,"stem":110},"Horizon","/docs/framework-guides/laravel/horizon","docs/3.framework-guides/1.laravel/4.horizon",{"title":112,"path":113,"stem":114},"Reverb","/docs/framework-guides/laravel/reverb","docs/3.framework-guides/1.laravel/4.reverb",{"title":116,"path":117,"stem":118},"Nightwatch","/docs/framework-guides/laravel/nightwatch","docs/3.framework-guides/1.laravel/5.nightwatch",{"title":120,"path":121,"stem":122},"Octane","/docs/framework-guides/laravel/octane","docs/3.framework-guides/1.laravel/octane",{"title":124,"icon":55,"defaultOpen":55,"path":125,"stem":126,"children":127,"page":55},"WordPress","/docs/framework-guides/wordpress","docs/3.framework-guides/2.wordpress",[128],{"title":129,"path":130,"stem":131},"Using Docker with WordPress","/docs/framework-guides/wordpress/using-wordpress-with-docker","docs/3.framework-guides/2.wordpress/4.using-wordpress-with-docker",{"title":133,"path":134,"stem":135,"children":136,"page":55},"Deployment And Production","/docs/deployment-and-production","docs/4.deployment-and-production",[137,141,145,149],{"title":138,"path":139,"stem":140},"Development to Production","/docs/deployment-and-production/development-to-production","docs/4.deployment-and-production/2.development-to-production",{"title":142,"path":143,"stem":144},"Packaging Your App for Deployment","/docs/deployment-and-production/packaging-your-app-for-deployment","docs/4.deployment-and-production/3.packaging-your-app-for-deployment",{"title":146,"path":147,"stem":148},"Configuring SSL","/docs/deployment-and-production/configuring-ssl","docs/4.deployment-and-production/4.configuring-ssl",{"title":150,"path":151,"stem":152},"Choosing a Host","/docs/deployment-and-production/choosing-a-host","docs/4.deployment-and-production/5.choosing-a-host",{"title":154,"icon":55,"defaultOpen":55,"path":155,"stem":156,"children":157,"page":55},"Advanced Guides","/docs/guide","docs/5.guide",[158,162,166,170,174],{"title":159,"path":160,"stem":161},"Migrating from official PHP images","/docs/guide/migrating-from-official-php-images","docs/5.guide/1.migrating-from-official-php-images",{"title":163,"path":164,"stem":165},"Using Healthchecks With Laravel","/docs/guide/using-healthchecks-with-laravel","docs/5.guide/2.using-healthchecks-with-laravel",{"title":167,"path":168,"stem":169},"Using S6 Overlay","/docs/guide/using-s6-overlay","docs/5.guide/2.using-s6-overlay",{"title":171,"path":172,"stem":173},"Understanding File Permissions","/docs/guide/understanding-file-permissions","docs/5.guide/3.understanding-file-permissions",{"title":175,"path":176,"stem":177},"Configuring Trusted Proxies","/docs/guide/configuring-trusted-proxies","docs/5.guide/4.configuring-trusted-proxies",{"title":179,"icon":55,"defaultOpen":55,"path":180,"stem":181,"children":182,"page":55},"Customization","/docs/customizing-the-image","docs/6.customizing-the-image",[183,187,191],{"title":184,"path":185,"stem":186},"Changing php.ini settings","/docs/customizing-the-image/changing-common-php-settings","docs/6.customizing-the-image/1.changing-common-php-settings",{"title":188,"path":189,"stem":190},"Installing PHP extensions","/docs/customizing-the-image/installing-additional-php-extensions","docs/6.customizing-the-image/2.installing-additional-php-extensions",{"title":192,"path":193,"stem":194},"Adding Start Up Scripts","/docs/customizing-the-image/adding-your-own-start-up-scripts","docs/6.customizing-the-image/3.adding-your-own-start-up-scripts",{"title":196,"path":197,"stem":198,"children":199,"page":55},"Troubleshooting","/docs/troubleshooting","docs/7.troubleshooting",[200,204],{"title":201,"path":202,"stem":203},"Common Issues","/docs/troubleshooting/common-issues","docs/7.troubleshooting/1.common-issues",{"title":205,"path":206,"stem":207},"Getting Help","/docs/troubleshooting/getting-help","docs/7.troubleshooting/2.getting-help",{"title":209,"path":210,"stem":211,"children":212,"page":55},"Reference","/docs/reference","docs/8.reference",[213,217],{"title":214,"path":215,"stem":216},"Environment Variable Specification","/docs/reference/environment-variable-specification","docs/8.reference/1.environment-variable-specification",{"title":218,"path":219,"stem":220},"Command Reference","/docs/reference/command-reference","docs/8.reference/2.command-reference",{"id":222,"title":129,"body":223,"description":785,"extension":763,"links":786,"meta":787,"navigation":790,"path":130,"redirect":786,"seo":791,"stem":131,"__hash__":792},"docs/docs/3.framework-guides/2.wordpress/4.using-wordpress-with-docker.md",{"type":224,"value":225,"toc":771},"minimark",[226,236,241,244,260,271,275,278,284,287,301,304,307,312,315,320,331,336,347,352,363,375,386,392,396,399,404,415,420,431,436,447,453,457,460,465,492,497,501,504,508,515,520,531,536,550,554,557,561,572,576,587,592,677,680,717,722,726,740,743,747,750,767],[227,228,229,233],"lead-p",{},[230,231,232],"p",{},"Docker can modernize your WordPress infrastructure with benefits like consistent environments, easier deployments, and better scalability.",[230,234,235],{},"However, WordPress's architecture predates modern containerization, so you'll need to balance container best practices with WordPress conventions to maintain plugin compatibility.",[237,238,240],"h2",{"id":239},"security-optimizations","Security Optimizations",[230,242,243],{},"These images include security hardening specifically for WordPress deployments:",[245,246,247,251,254,257],"ul",{},[248,249,250],"li",{},"Hardened Apache & NGINX configurations",[248,252,253],{},"XML-RPC disabled by default (prevents common attack vectors)",[248,255,256],{},"Protected access to sensitive files (.git, .env, CI configurations)",[248,258,259],{},"Additional protections against common WordPress exploits",[230,261,262,263,270],{},"See our ",[264,265,269],"a",{"href":266,"rel":267},"https://github.com/serversideup/docker-php/blob/main/src/variations/fpm-apache/etc/apache2/conf-available/security.conf",[268],"nofollow","Apache security.conf"," for complete details.",[237,272,274],{"id":273},"the-wordpress-way","\"The WordPress Way\"",[230,276,277],{},"WordPress has evolved significantly over the years, but its architecture was designed before modern containerization practices became standard. This means you'll find the smoothest experience when you align with WordPress's conventions rather than trying to impose modern development patterns that conflict with how WordPress expects to operate.",[230,279,280],{},[281,282,283],"strong",{},"What does \"The WordPress Way\" mean for Docker users?",[230,285,286],{},"WordPress was built with certain assumptions:",[245,288,289,292,295,298],{},[248,290,291],{},"Files are directly accessible and writable by the web server",[248,293,294],{},"Plugins and themes can be updated through the admin interface",[248,296,297],{},"The application runs on traditional LAMP (Linux, Apache, MySQL, PHP) stacks",[248,299,300],{},"Core, plugins, and themes are typically deployed together",[230,302,303],{},"When you try to modernize WordPress with approaches like immutable containers, NGINX instead of Apache, or separating core files from your custom code, you may encounter compatibility issues with popular plugins that expect traditional WordPress file structures and permissions.",[230,305,306],{},"The more you work with WordPress's conventions, the fewer compatibility issues you'll face with community plugins and themes.",[308,309,311],"h3",{"id":310},"common-compatibility-challenges","Common Compatibility Challenges",[230,313,314],{},"Modern container practices that work well with Laravel or other frameworks may cause issues with WordPress:",[230,316,317],{},[281,318,319],{},"Using NGINX instead of Apache",[245,321,322,325,328],{},[248,323,324],{},"Many WordPress plugins expect Apache's .htaccess functionality",[248,326,327],{},"URL rewriting rules often need manual translation to NGINX",[248,329,330],{},"Some plugins detect the web server and behave differently",[230,332,333],{},[281,334,335],{},"Packaging WordPress core into images",[245,337,338,341,344],{},[248,339,340],{},"The WordPress admin expects to update core, plugins, and themes through the UI",[248,342,343],{},"Immutable containers conflict with this expectation",[248,345,346],{},"Popular plugins may break when they can't write to expected directories",[230,348,349],{},[281,350,351],{},"Using newer PHP versions",[245,353,354,357,360],{},[248,355,356],{},"Some popular plugins haven't updated for newer PHP versions",[248,358,359],{},"WordPress core itself is conservative with PHP version requirements",[248,361,362],{},"Testing against your specific plugin stack is essential",[230,364,365],{},[281,366,367,368,374],{},"Using modern project structures (like ",[264,369,373],{"href":370,"rel":371,"target":372},"https://roots.io/",[268],"_blank","Roots Bedrock",")",[245,376,377,380,383],{},[248,378,379],{},"Changes WordPress's default directory structure",[248,381,382],{},"Some plugins hardcode paths and break with non-standard layouts",[248,384,385],{},"Community support often assumes standard WordPress structure",[387,388,389],"tip",{},[230,390,391],{},"Test thoroughly with your specific plugins before committing to a non-traditional setup. The WordPress ecosystem is vast, and compatibility varies widely.",[237,393,395],{"id":394},"recommended-approach","Recommended Approach",[230,397,398],{},"Based on our experience running WordPress in production containers, we recommend these principles:",[230,400,401],{},[281,402,403],{},"1. Align with WordPress conventions",[245,405,406,409,412],{},[248,407,408],{},"Use Apache as your web server for maximum plugin compatibility",[248,410,411],{},"Allow WordPress to manage its own updates when possible",[248,413,414],{},"Maintain the standard WordPress directory structure",[230,416,417],{},[281,418,419],{},"2. Keep customizations minimal",[245,421,422,425,428],{},[248,423,424],{},"Limit plugin installation to essential functionality",[248,426,427],{},"Fewer plugins means fewer compatibility concerns",[248,429,430],{},"Each plugin is a potential maintenance burden",[230,432,433],{},[281,434,435],{},"3. Separate your code from WordPress core",[245,437,438,441,444],{},[248,439,440],{},"Only commit your custom themes and plugins to version control",[248,442,443],{},"Exclude WordPress core and third-party plugins from your repository",[248,445,446],{},"This makes your codebase smaller and easier to manage",[448,449,450],"note",{},[230,451,452],{},"These recommendations prioritize stability and community compatibility. If your project has specific requirements that conflict with these principles, thoroughly test your setup with all your required plugins.",[237,454,456],{"id":455},"production-stack-example","Production Stack Example",[230,458,459],{},"Here's a proven WordPress stack running on Docker Swarm that balances containerization benefits with WordPress compatibility:",[230,461,462],{},[281,463,464],{},"Infrastructure components:",[466,467,468,476,484],"ol",{},[248,469,470,475],{},[264,471,474],{"href":472,"rel":473,"target":372},"https://traefik.io/traefik/",[268],"Traefik"," - Automatic SSL with Let's Encrypt and request routing",[248,477,478,483],{},[264,479,482],{"href":480,"rel":481,"target":372},"https://hub.docker.com/r/serversideup/php/tags?name=fpm-apache",[268],"serversideup/php:8.5-fpm-apache"," - PHP with Apache for WordPress compatibility",[248,485,486,491],{},[264,487,490],{"href":488,"rel":489,"target":372},"https://hub.docker.com/_/mariadb",[268],"MariaDB"," - MySQL-compatible database without Oracle licensing",[387,493,494],{},[230,495,496],{},"Apache is recommended over NGINX for WordPress because many plugins rely on .htaccess files and Apache-specific functionality.",[237,498,500],{"id":499},"deployment-strategies","Deployment Strategies",[230,502,503],{},"WordPress presents unique challenges when deciding how to deploy updates in containerized environments.",[308,505,507],{"id":506},"immutable-container-approach-advanced","Immutable Container Approach (Advanced)",[230,509,510,511,514],{},"Packaging WordPress into Docker images with tools like ",[264,512,373],{"href":370,"rel":513,"target":372},[268]," enables modern deployment practices:",[230,516,517],{},[281,518,519],{},"Benefits:",[245,521,522,525,528],{},[248,523,524],{},"Rolling updates with zero downtime",[248,526,527],{},"Immutable infrastructure (containers don't change after deployment)",[248,529,530],{},"Easy rollback to previous versions",[230,532,533],{},[281,534,535],{},"Challenges:",[245,537,538,541,544,547],{},[248,539,540],{},"Many popular plugins expect to write to WordPress directories",[248,542,543],{},"Plugin updates must happen outside the WordPress admin interface",[248,545,546],{},"Requires thorough compatibility testing with your plugin stack",[248,548,549],{},"Non-standard directory structure breaks some plugins",[308,551,553],{"id":552},"volume-based-approach-traditional","Volume-Based Approach (Traditional)",[230,555,556],{},"Treating containers as the runtime environment while keeping WordPress files on persistent volumes offers the most compatibility:",[230,558,559],{},[281,560,519],{},[245,562,563,566,569],{},[248,564,565],{},"WordPress admin can update core, plugins, and themes normally",[248,567,568],{},"Maximum compatibility with community plugins",[248,570,571],{},"Familiar workflow for WordPress developers",[230,573,574],{},[281,575,535],{},[245,577,578,581,584],{},[248,579,580],{},"Updates aren't versioned in your deployment pipeline",[248,582,583],{},"Requires traditional deployment methods for custom code",[248,585,586],{},"Less alignment with immutable infrastructure principles",[230,588,589],{},[281,590,591],{},"Example implementation:",[593,594,599],"pre",{"className":595,"code":596,"filename":597,"language":598,"meta":10,"style":10},"language-yml shiki shiki-themes github-dark","services:\n  wordpress:\n    image: serversideup/php:8.5-fpm-apache\n    volumes:\n      - ./:/var/www/html\n    ports:\n      - 80:8080\n      - 443:8443\n","compose.yml","yml",[600,601,602,615,623,636,644,653,661,669],"code",{"__ignoreMap":10},[603,604,607,611],"span",{"class":605,"line":606},"line",1,[603,608,610],{"class":609},"s4JwU","services",[603,612,614],{"class":613},"s95oV",":\n",[603,616,618,621],{"class":605,"line":617},2,[603,619,620],{"class":609},"  wordpress",[603,622,614],{"class":613},[603,624,626,629,632],{"class":605,"line":625},3,[603,627,628],{"class":609},"    image",[603,630,631],{"class":613},": ",[603,633,635],{"class":634},"sU2Wk","serversideup/php:8.5-fpm-apache\n",[603,637,639,642],{"class":605,"line":638},4,[603,640,641],{"class":609},"    volumes",[603,643,614],{"class":613},[603,645,647,650],{"class":605,"line":646},5,[603,648,649],{"class":613},"      - ",[603,651,652],{"class":634},"./:/var/www/html\n",[603,654,656,659],{"class":605,"line":655},6,[603,657,658],{"class":609},"    ports",[603,660,614],{"class":613},[603,662,664,666],{"class":605,"line":663},7,[603,665,649],{"class":613},[603,667,668],{"class":634},"80:8080\n",[603,670,672,674],{"class":605,"line":671},8,[603,673,649],{"class":613},[603,675,676],{"class":634},"443:8443\n",[230,678,679],{},"Deploy your custom theme/plugin updates:",[593,681,685],{"className":682,"code":683,"language":684,"meta":10,"style":10},"language-bash shiki shiki-themes github-dark","# On your deployment server\ncd /path/to/your/project\ngit pull origin main\n","bash",[600,686,687,693,702],{"__ignoreMap":10},[603,688,689],{"class":605,"line":606},[603,690,692],{"class":691},"sAwPA","# On your deployment server\n",[603,694,695,699],{"class":605,"line":617},[603,696,698],{"class":697},"sDLfK","cd",[603,700,701],{"class":634}," /path/to/your/project\n",[603,703,704,708,711,714],{"class":605,"line":625},[603,705,707],{"class":706},"svObZ","git",[603,709,710],{"class":634}," pull",[603,712,713],{"class":634}," origin",[603,715,716],{"class":634}," main\n",[448,718,719],{},[230,720,721],{},"This approach prioritizes plugin compatibility over modern deployment practices. It works reliably with the widest range of WordPress plugins while still benefiting from containerized infrastructure.",[308,723,725],{"id":724},"which-approach-should-you-choose","Which approach should you choose?",[245,727,728,734],{},[248,729,730,733],{},[281,731,732],{},"Volume-based",": Best for sites heavily dependent on third-party plugins or when you need maximum WordPress ecosystem compatibility",[248,735,736,739],{},[281,737,738],{},"Immutable containers",": Best for custom WordPress applications with minimal third-party dependencies where you control the entire codebase",[230,741,742],{},"Always test your specific plugin stack thoroughly before committing to either approach.",[237,744,746],{"id":745},"example-repository","Example Repository",[230,748,749],{},"Below is an example repository showing the \"traditional\" approach to using WordPress with Docker.",[751,752],"u-button",{"ariaLabel":753,"className":754,"color":762,"label":753,"size":763,"target":372,"to":764,"trailing-icon":765,"variant":766},"View the Example WordPress + Docker Repository",[755,756,757,758,759,760,761],"font-bold","ring","ring-inset","ring-blue-600","text-blue-600","hover:ring-blue-500","hover:text-blue-500","primary","md","https://github.com/serversideup/docker-wordpress","i-lucide-arrow-right","outline",[768,769,770],"style",{},"html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}",{"title":10,"searchDepth":617,"depth":617,"links":772},[773,774,777,778,779,784],{"id":239,"depth":617,"text":240},{"id":273,"depth":617,"text":274,"children":775},[776],{"id":310,"depth":625,"text":311},{"id":394,"depth":617,"text":395},{"id":455,"depth":617,"text":456},{"id":499,"depth":617,"text":500,"children":780},[781,782,783],{"id":506,"depth":625,"text":507},{"id":552,"depth":625,"text":553},{"id":724,"depth":625,"text":725},{"id":745,"depth":617,"text":746},"Learn how serversideup/php is optimized for running WordPress in production.",null,{"head":788,"layout":7},{"title":789},"WordPress Optimizations - Docker PHP - Server Side Up",true,{"title":129,"description":785},"ebwyVIi22_p2QhIpOjQaLb_a2-9bZLMfXbq-iferlUw",[794,796],{"title":120,"path":121,"stem":122,"description":795,"children":-1},"Learn how to configure Laravel Octane with Docker.",{"title":138,"path":139,"stem":140,"description":797,"children":-1},"Learn how to take your PHP application from development to production with confidence using Docker.",1776367063227]