定制 n5s/wp-symfony-local-server 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

n5s/wp-symfony-local-server

最新稳定版本:v2.0.0

Composer 安装命令:

composer require n5s/wp-symfony-local-server

包简介

Fixes WordPress compatibility issues when running on Symfony Local Server with local domain names

README 文档

README

Fixes WordPress compatibility issues when running on Symfony Local Server with local domains (.wip).

Installation

composer require n5s/wp-symfony-local-server --dev

That's it. The library auto-detects Symfony Local Server and registers the necessary hooks.

What it fixes

Problem Solution
Self-requests fail (SSL errors, unresolved .wip TLD) Routes them through Symfony's proxy with proper certificates
/wp-admin/ causes redirect loops Rewrites to /wp-admin/index.php (why?)
Redirect caching issues Uses HTTP 302 instead of 301 for admin redirects

How it works

The library only activates when it detects Symfony Local Server (via SERVER_SOFTWARE header or ~/.symfony5/proxy.json config). It then:

  1. Sets WP_PROXY_HOST and WP_PROXY_PORT to route internal requests through Symfony's proxy
  2. Provides Symfony's root CA certificate for SSL verification
  3. Hooks into admin_url and redirect_canonical to fix admin URL handling

Requirements

  • PHP 8.2+
  • Symfony CLI with local proxy configured

统计信息

  • 总下载量: 201
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固