user123212
user123212

Reputation: 145

Can two different WordPress blogs on the same server use a common theme folder?

I have two WordPress blogs running on the same server, so they both have access to the same file system. Both blogs use the same template, and this template is duplicated within each theme directory. Every time that I update the theme I need to copy over the new files to both theme directories.

Is it possible to have both of these blog share a common theme directory so that I only need to modify one template folder?

Upvotes: 2

Views: 1663

Answers (3)

alexn
alexn

Reputation: 58992

Absolutely. Just make sure that they have read and write access to that shared folder.

Then set up a symlink from each of the theme folders. You do this with ln -s <origin> <new>

If you can't use symbolic links, you can then set up a rewrite-rule, which redirects all requests from /wp-content/themes to like /var/www/shared/themes.

If you want, I can provide an example.

Upvotes: 4

Devin Reams
Devin Reams

Reputation: 981

Another approach, if using source control (SVN, Git), would be to checkout the theme into the two locations and update them.

Upvotes: 0

yrral
yrral

Reputation: 949

You can have a symlink link one theme folder to another.

delete one of the theme folders and use ln like cp

ln -s <source> <dest>

Upvotes: 3

Related Questions