KatPadi's Point

Use of Symlink in WP Development

In a perfect world, one should not edit the WordPress core so it is just proper to separately develop, update and version control the plugins and themes.

With that said, WordPress development can be a pain in the ass when it comes to migrating, testing or deployment. The placing of things and permissions, etc. can be frustrating when you don’t set up everything properly.

I’ve been using this sort of technique to ease my development a little bit.

ln -s /home/kat/Playground/katpadi-blog/ /var/www/blog/wp-content/themes/katpadi-blog

*The destination target must not have a trailing slash.*

After doing this, everything that I do with my katpadi-blog in the Playground will always be in /var/www/blog/wp-content/themes/katpadi-blog because /var/www/blog/wp-content/themes/katpadi-blog is linked to it.

You can now easily develop just in your Playground.

Also, I put all my codes in a directory playground. Everything is in git here. Meanwhile, the WP is set up in /var/www/ which is the root directory.

Scrreenshot that shows symlink

Scrreenshot that shows symlink

Leave a Reply

Your email address will not be published. Required fields are marked *