{"id":1369,"date":"2026-02-15T20:14:33","date_gmt":"2026-02-15T20:14:33","guid":{"rendered":"https:\/\/docs.ai.drawconclusions.org\/?page_id=1369"},"modified":"2026-02-24T12:45:58","modified_gmt":"2026-02-24T12:45:58","slug":"wordpress-ops","status":"publish","type":"page","link":"https:\/\/docs.ai.drawconclusions.org\/?page_id=1369","title":{"rendered":"WordPress Ops (Codex)"},"content":{"rendered":"<h2>Ops<\/h2>\n<p>This page is written for Codex (automation), not for humans. It captures lessons learned and tips that reduce trial-and-error when maintaining the WordPress setup.<\/p>\n<h2>Lessons Learned<\/h2>\n<ul>\n<li>WordPress runs in Docker; the config and content that must be preserved live outside the container.<\/li>\n<li>Bind-mount these server paths into the WordPress container:<\/li>\n<li><code>\/var\/www\/devdocs_wp\/wp-config.php<\/code><\/li>\n<li><code>\/var\/www\/devdocs_wp\/wp-content\/mu-plugins\/<\/code><\/li>\n<li><code>\/var\/www\/devdocs_wp\/wp-content\/_view_engine\/<\/code><\/li>\n<li><code>\/var\/www\/devdocs_wp\/wp-content\/plugins\/<\/code><\/li>\n<li><code>\/var\/www\/devdocs_wp\/wp-content\/themes\/<\/code><\/li>\n<li>Mount <code>\/var\/www\/config.xml<\/code> into the WordPress container read-only so plugins can read admin settings.<\/li>\n<li>The Codex admin auto-login depends on <code>admin\/ip<\/code> in <code>\/var\/www\/config.xml<\/code> and the container seeing the real client IP.<\/li>\n<li>If auto-login fails, log the request IPs (<code>REMOTE_ADDR<\/code>, <code>HTTP_X_REAL_IP<\/code>, <code>HTTP_X_FORWARDED_FOR<\/code>) and compare to <code>admin\/ip<\/code>.<\/li>\n<\/ul>\n<h2>Useful Tips (Codex)<\/h2>\n<ul>\n<li>Treat <code>\/var\/www\/devdocs_wp<\/code> as the WordPress data root (config, plugins, themes).<\/li>\n<li>Keep local mirror paths in <code>server\/var_www\/devdocs_wp<\/code> and sync via <code>python3 scripts_local\/sync_unified.py<\/code> or <code>python3 scripts_local\/publish_devdocs.py<\/code>.<\/li>\n<li>When changing container mounts, recreate containers with <code>docker compose up -d --force-recreate<\/code>.<\/li>\n<li>Use the database container for direct SQL when WP-CLI is unavailable.<\/li>\n<li>If you must activate a plugin without WP-CLI, update <code>wp_options.active_plugins<\/code> directly.<\/li>\n<li>After DevDocs issue fixes, verify live behavior with <code>curl<\/code> before claiming success.<\/li>\n<\/ul>\n<h2>Debugging Playbook<\/h2>\n<ul>\n<li>Check that <code>\/var\/www\/config.xml<\/code> is mounted inside the container.<\/li>\n<li>Check that <code>wp-content\/mu-plugins<\/code> and <code>wp-content\/_view_engine<\/code> are mounted in <code>wordpress-app<\/code> when Twig-based rendering\/plugins fail.<\/li>\n<li>Verify the admin auto-login plugin is active in <code>wp_options.active_plugins<\/code>.<\/li>\n<li>Use the plugin log to see the IP mismatch and adjust logic if needed.<\/li>\n<\/ul>\n<h2>Safety<\/h2>\n<ul>\n<li>Avoid copying full WordPress folders back and forth.<\/li>\n<li>Keep the server clean; only mirror the intended WordPress data folders.<\/li>\n<\/ul>\n<p class=\"developerdocs-id-search\" aria-hidden=\"true\">DeveloperDoc ID: dd_id_8e8d3ede5b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ops This page is written for Codex (automation), not for humans. It captures lessons learned and tips that reduce trial-and-error when maintaining the WordPress setup. Lessons Learned WordPress runs in Docker; the config and content that must be preserved live outside the container. Bind-mount these server paths into the WordPress container: \/var\/www\/devdocs_wp\/wp-config.php \/var\/www\/devdocs_wp\/wp-content\/mu-plugins\/ \/var\/www\/devdocs_wp\/wp-content\/_view_engine\/ \/var\/www\/devdocs_wp\/wp-content\/plugins\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1308,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[],"doc_layer":[29],"class_list":["post-1369","page","type-page","status-publish","hentry","layer-dd_id_251cc20e41"],"_links":{"self":[{"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=\/wp\/v2\/pages\/1369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1369"}],"version-history":[{"count":6,"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=\/wp\/v2\/pages\/1369\/revisions"}],"predecessor-version":[{"id":3915,"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=\/wp\/v2\/pages\/1369\/revisions\/3915"}],"up":[{"embeddable":true,"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=\/wp\/v2\/pages\/1308"}],"wp:attachment":[{"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1369"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_category&post=1369"},{"taxonomy":"doc_layer","embeddable":true,"href":"https:\/\/docs.ai.drawconclusions.org\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_layer&post=1369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}