Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Ideally I would like to do this with both my PC and Mac OSX boxes, but for now I would be thrilled with just the Mac OSX.

I am trying to keep my WP Themes & Plugin Local Development synced using Dropbox. I am using XAMPP for both Windows and Mac as my LAMP Stack and am wondering what I have to set in order to get the Mac. Based off the Codex I can do this via setting these two items:

define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/somedir');
define('WP_CONTENT_URL', 'http://example.com/somedir');

I am successful in changing WP_CONTENT_DIR to /Users/seth/Dropbox/Xammp-Content/wordpress/wp-content/, which allows me to see my available themes and activate them, however any of the resources (styles.css, images, etc.) doesn't resolve and thus I have a bunch of failed GETs on the resources and the theme is unstyled.

Upon further inspection this is the URL resolved for styles.css

http://localhost:8080/wp-content/themes/[theme-name]/styles.css

Which again is a failed resource to load.

I have no idea what to set WP_CONTENT_URL to...

Any help? Appreciate it.

share|improve this question
    
So what is your local domain? And what port are you using? Without such info it's really hard to answer that. –  kaiser Aug 16 '13 at 11:02
add comment

2 Answers

up vote 1 down vote accepted

You will need to create an alias to your Dropbox folder so those files can be accessed on your server. This can be done in httpd.conf:

Alias /dropbox /Users/seth/Dropbox

Or you could make a direct alias to the real wp-content folder:

Alias /wp-content /Users/seth/Dropbox/Xammp-Content/wordpress/wp-content/

Then set WP_CONTENT_URL in wp-config.php appropriately:

define( 'WP_CONTENT_URL', 'http://localhost/dropbox/Xammp-content/wordpress/wp-content' );
share|improve this answer
add comment

I use Dropbox as well, but not directly linked as the Dropbox folder path could differ from install to install. My Dropbox just is the root of my bare git repository.

Simplified...

When I start coding, I just add a new folder to my Dropbox and --bare init it.

// Inside your Dropbox/webdev/themes folder for e.g.
git --bare init

Then inside your new Theme folder you simply init a default repo.

git init

Finally just work, git push dropbox master and git clone etc. when you're doing a new setup on another machine or use git pull etc. when you're switching machines.

share|improve this answer
    
I went with this technique although it was outside my desired path of the question. –  Seth Duncan Oct 17 '13 at 20:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.