On my local machine, I have multiple wordpress versions installed so I can test the themes and plugins I develop.

I was wondering if I could somehow create a central wp-content folder and database, which are linked to each version of wordpress, so I don’t have to continually copy my projects between the them?

2 Answers
2

For wp-content folder you need to add WP_CONTENT_DIR with path to this folder to each wp-config.php file of each your sites. All of these WP_CONTENT_DIR constants should have the same path to one folder. Read more about it here: http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content

To share the same database, you just need to setup the same database settings in each wp-config.php files. Read about it here: http://codex.wordpress.org/Editing_wp-config.php#Set_Database_Name

UPDATE: To make your urls work correctly define WP_SITEURL and WP_HOME constants which will override options settings. Read about it here: http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29

Leave a Reply

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