• I have dozens of WordPress installs on my Windows 7 development machine and it’s making antivirus scans and backups/migrations/other tasks incredibly slow (hundreds of thousands of files). So I need to set up my environment to use a single source directory for the core files, and of course I’m running into issues:

    I created a common core folder, and then to test I chose an install and then deleted the root files and wp-admin/wp-includes folders (I left the wp-config.php file alone). I created junctions (soft links) for all the files in the root WordPress folder and the wp-admin/wp-includes folders. Junctions have worked well before and I use them for plugins and themes that I develop so I don’t have to update them manually on each local site. However, now WordPress admin wants to run the new site install wizard instead of running the wp-admin dashboard (the site is already installed and wp-config.php has the correct database information).

    What could be going on? Has anyone else done anything like this? How did you get it working?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator James Huff

    (@macmanx)

    Why not use a multisite network?

    https://codex.ww.wp.xz.cn/Create_A_Network

    I doubt a multisite would run well (if at all) on Windows 7. I think it would need htaccess… maybe not.

    And the other solution using symbolic links isn’t available on Windows either (As far as I know).

    Moderator James Huff

    (@macmanx)

    There are a variety of local server options to choose from, which will give you Apache, and therefore the ability to use .htaccess: https://make.ww.wp.xz.cn/core/handbook/tutorials/installing-a-local-server/

    Thread Starter vision-hive

    (@vision-hive)

    There are several reasons not to use multisite – specifically these are completely separate sites for different clients, the code base needs to be identical to the production versions, the databases need to be separate because they are deployed across various physical servers and identical so that they can be exported/imported to/from production or staging without requiring additional modification. Managing a multisite locally while having single installs on staging and production quickly gets far more unmanageable than the existing development environment with all its duplication.

    The actual issue here is that the function dirname( __FILE__ ) on line 21 of wp-load.php will return the target directory of a symbolic link but not the link’s directory, which is a decades-old bug in PHP (or a failure at least, there should be a way to get the location of the link but the gods who make PHP decreed that This Shall Not Happen for whatever reason). For now, I’m using .htaccess on all the local directories to prepend a custom script that defines ABSPATH before WordPress can do so – which works (still testing but so far I’m able to navigate the admin dashboard using this common core)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Single WordPress core for multiple local installs’ is closed to new replies.