Question

WordPress is constructed in such a way that if you create a local project and upload it, it doesn't work on the remote server, due to "serialized data in arrays" I believe. Links to images and links between internal pages are messed up when the project is uploaded. There are ways to fix this, but the process is not simple and easy.

So for some time now, I've been coding my WordPress site remotely, using Filezilla. Filezilla lets you view/edit a remote file by automatically downloading it into a temp folder on your computer. When I'm done editing the file in NotePad++, I switch back to Filezilla which will automatically detect the change and offer to upload the file to the server. This works well with Sass. I have Sass set up to watch the temporary file (Filezilla always creates the exact same filename in this folder) and I edit the style.scss file, so the temporary file is actually CSS compiled from my style.scss file. This is a cumbersome workflow, but it does work.

Recently, I discovered Aptana Studio 3, which is an IDE that can incorporate Sass and a lot of other magic right into a single project, I think. I have figured out how to set up a remote project with Aptana so that it will do much the same thing as I was doing with Filezilla, but I haven't figured out how to set up Sass/Compass to watch the style.scss file inside this project. To get Compass or Sass to watch a file, you need to tell it to do just that. My problem is that my project is on the remote server, and I don't know just what file Aptana is creating on my local computer so that I can tell Compass to watch it. I'm almost certain that it's a temporary file created similar to the file that Filezilla creates, but I have been unable to find any documentation or discussion that addresses this particular situation. Has anybody done this before, or am I going about it the wrong way?

UPDATE: I have figured out that Aptana creates temporary files in the same temp folder. However, when I open one remote file, style.css, Aptana creates TWO identical local files in the temp folder: aptanavfs6322917849903605871style.scss and aptanavfs4866068649867540771style.scss.

If I close the remote file in Aptana and reopen it, Aptana creates two more identical files, each with an apparently random number in its name.

If Aptana doesn't provide an automatic way to watch a remote css file, then it looks like I would need to use a Regular Expression in the watch command (which I'm not sure will work) so that Compass can find the file, except that any Regular Expression would find BOTH files, which I'm assuming would confuse Compass. This rabbit hole is getting deep. I'm hoping somebody has found a way to set this up so that Aptana takes care of it automatically.

No correct solution

OTHER TIPS

You could SSH into the server to run the command but that's not ideal.

The issue you mentioned which is preventing you from developing locally is easily remedied. I'd suggest looking into that instead.

Doing a search and replace on the DB will break any serialised data if the length of the URL changes. This doesn't affect all areas by the way. Use this script instead of doing it manually. http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

For more info see http://codex.wordpress.org/Moving_WordPress

Alternatively you could change the home / site URL in the options table (or define them as constants in wp-config.php) and use a plugin like http://wordpress.org/plugins/velvet-blues-update-urls/ to replace the remaining URLs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top