Permalink
Browse files

getting rid of the media/ directory. More trouble than it's worth

  • Loading branch information...
1 parent d97346d commit 88b819c7c0fc1feded45425d28e678f51ddb20f0 @ryanmark ryanmark committed Feb 15, 2012
Showing with 9 additions and 8 deletions.
  1. +2 −1 README.md
  2. +3 −3 fablib.py
  3. +1 −1 setup.sh
  4. +3 −3 wp-scripts/setup_upload_dirs.php
View
@@ -12,7 +12,8 @@ We moved everything out of the WordPress directory so that we could make ample u
data/ # Store configuration for the site, data dumps and data files for doing migrations
lib/ # Place to put extra php libraries
- media/ # Where uploads and blogs.dir go
+ uploads/ # Wordpress uploads for a single blog or the root blog in a network
+ blogs.dir/ # Uploads for network blogs
plugins/ # Put your wordpress plugins here
tools/ # This repository
http/ # Place for your apache, nginx, http server config files
View
@@ -226,7 +226,7 @@ def destroy_db():
if env.db_host == 'localhost':
env.run('mysqladmin -f --user=%(db_root_user)s --password=%(db_root_pass)s drop %(project_name)s' % env)
env.run('echo "DROP USER \'%(db_wpuser_name)s\'@\'localhost\';" | mysql --user=%(db_root_user)s --password=%(db_root_pass)s' % env)
- else:
+ elif confirm("Are you sure you want to drop the %s database?" % env.settings):
env.run('mysqladmin -f --host=%(db_host)s --user=%(db_root_user)s --password=%(db_root_pass)s drop %(project_name)s' % env)
env.run('echo "DROP USER \'%(db_wpuser_name)s\'@\'%%\';" | mysql --host=%(db_host)s --user=%(db_root_user)s --password=%(db_root_pass)s' % env)
@@ -278,8 +278,7 @@ def fix_perms():
def link_media():
check_env()
with cd(env.path):
- env.run("ln -s /mnt/apps/media/%(project_name)s media" % env)
- env.run("ln -s /mnt/apps/media/%(project_name)s/fragment-cache fragment-cache" % env)
+ env.run("ln -s /mnt/apps/media/%(project_name)s/* ./" % env)
print('Remember to sync!');
@@ -369,6 +368,7 @@ def run_script(script_name):
"""
Run a script in the /wp-scripts/ directory.
"""
+ check_env()
env.script_name = script_name
with cd(env.path):
env.run(env.prefix + './manage.sh %(script_name)s' % env)
View
@@ -33,7 +33,7 @@ git init
git submodule add https://github.com/newsapps/wp-project-tools.git tools
# Setup some project directories
-mkdir lib mu-plugins plugins themes wp-scripts
+mkdir lib mu-plugins plugins themes wp-scripts blogs.dir uploads
# Get WordPress
git submodule add https://github.com/WordPress/WordPress.git wordpress
@@ -13,7 +13,7 @@
include( 'tools/cli-load.php' );
-update_option("upload_path", "../media/uploads");
+update_option("upload_path", "../uploads");
update_option("upload_url_path", "/wp-content/uploads");
print( "Set the root blog upload dir to 'media/uploads'\n" );
@@ -26,9 +26,9 @@
$blog_slug = str_replace('/', '', $blog['path']);
- update_option("upload_path", "../media/blogs.dir/${blog['blog_id']}");
+ update_option("upload_path", "../blogs.dir/${blog['blog_id']}");
update_option("upload_url_path", "/wp-content/blogs.dir/${blog['blog_id']}");
- print( "Set the upload dir for '".get_bloginfo('name')."' to 'media/blogs.dir/${blog['blog_id']}'\n" );
+ print( "Set the upload dir for '".get_bloginfo('name')."' to 'blogs.dir/${blog['blog_id']}'\n" );
restore_current_blog();
}

0 comments on commit 88b819c

Please sign in to comment.