惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
人人都是产品经理
人人都是产品经理
美团技术团队
Blog — PlanetScale
Blog — PlanetScale
S
SegmentFault 最新的问题
博客园 - 【当耐特】
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
量子位
罗磊的独立博客
月光博客
月光博客
N
Netflix TechBlog - Medium
大猫的无限游戏
大猫的无限游戏
博客园_首页
P
Proofpoint News Feed
Jina AI
Jina AI
云风的 BLOG
云风的 BLOG
博客园 - 司徒正美
腾讯CDC

Jeremy Carlson

Convert Post Metadata into Tags (Terms) – Jeremy Carlson Excluding a directory from WordPress – Jeremy Carlson Pay attention. – Jeremy Carlson A SASS Mixin to accommodate @font-face fallbacks – Jeremy Carlson Can I use type in an image? – Jeremy Carlson Creating a site structure for the future – Jeremy Carlson Running a Successful Business with the Add-On Model – Jeremy Carlson What I Learned About WordPress Development by Interviewing 15 of the Best WordPress Developers – Jeremy Carlson Quirky Client Communication and How to Fix It – Jeremy Carlson
Reorganize your WordPress files to make your life easier ...
Jeremy · 2016-11-08 · via Jeremy Carlson

I really enjoyed my second Denver WordCamp this weekend—it was great to run into faces familiar and new, and learn all kinds of useful information, hear great advice, and more. Might write more up, but a friend pinged me this morning following up on a question, and I thought it would be useful to post.

While chatting in a hallway, the subject of alternative folder setups came up, and a couple of folks were interested in:

  • setting up WordPress in a subfolder, and
  • moving the wp-content folder to a different location

I thought I’d post my current favorite setup for files and configuration.

It starts with the Awesome Config File by Ashfame, based on his answer to a question about keeping your wp-config file in version control. We include more complicated stuff in the main config file, but move login credentials up one level from root so it’s (a) not in a GIT repository and (b) not web-accessible (which may not do much for security really but can’t hurt).

I always go crazy when trying to access the wp-content folder in a file open dialogue, or in Mac’s Finder, because it’s in the middle of a long list of files in WordPress. I use my keyboard for quick navigation of folders, and with the default WordPress install, I have to type “wp-cont” before I can get to that folder. When you access that folder again and again, those 7 characters add up. So getting the folder OUT of the WordPress install is great.

My setup kind of looks like this:

root/
  .htaccess
  index.php — copy of WP default index.php, but needs to be tweaked slightly
  site-content/ — this is my replacement for wp-content
  wp/ — default WP install goes here
  wp-config.php
config-folder/
  local-config.php — includes credentials for local site, omitted on production site
  production-config.php — includes credentials for production site

This setup has made it super-easy for me to access site files quickly while working on them, it keeps the default WP install easy to replace, and it lets the whole thing be in a GIT repo if I want. There are other issues there, may touch on them sometime. But that’s what I know for now.

Download a sample file structure & wp-config file here.

Hey Lisa, hope this is useful!