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
Related Posts:
- Have multiple local wordpress installs share a wp-content folder and database
- MySQL Database User: Which Privileges are needed?
- Database synchronization between dev/staging and production
- How can I make updates to a site, on a development copy, but then move updates back without overriding live site’s evolving database?
- Safest way to bulk delete post revisions
- How can I make a WordPress database portable and url independent?
- Why does $wpdb return strings for mysql integer values?
- Dealing with Many Meta Values, 30+
- When is it appropriate to create a new table in the WordPress database?
- Is it possible to switch the data layer within WordPress?
- store simple data in get_option()
- Presentation vs Content in WP DB-Tables
- How to delete outdated, wrongly sized images in _wp_attachment_metadata?
- How to implement content from external database into WordPress text page? [closed]
- Cloning and syncing a WordPress website
- What actions affect files, DB, or both?
- Why do wordpress store pages/posts within the database instead of files? [closed]
- Add search Value to wp_list_table pagination
- Database sync between local and production
- How to fix unchanged URLs in Database after running serialized search and replace script?
- Merging WordPress posts from different databases
- Should non-WordPress data get its own DB?
- Who is responsible for data sanitization in WordPress development?
- Search and replace special characters (å,ä,ö) for image attachments only in database
- Import live site to local setup without access to live site
- Why do mass updates to post_content shows in front end, but not in edit screen?
- Output custom content not from the posts table?
- Localhost to Staging to Development Dynamic WP-CONFIG
- Setup 3 Sites To Connect To 1 Database and Share Data
- Setup private content for specific users with daily updates [closed]
- Uknown meta entries in wp_postmeta
- creating new field on mysql
- Remove empty rows from the database
- Why user_pass column in wp_users table is varchar(64)
- Delete/Replace words from X to Y in post content
- content disappearing minutes after it’s published
- Design problems when exporting remote database for local development
- Backing up WordPress database and files
- Image link issues after importing a database backup to my local web server
- SymmetricDS in dev + prod workflow?
- New installation fatal error in 5.9.3 at edit or create entry
- Error establishing a database connection with XAMPP
- A WP dev site that displays content from a live site’s database but cannot write to wp_posts?
- WPCLI search and replace in a particlar site dir effect another site-dir
- Merging development site with live site
- Cloned site not connecting to database – MAMP
- I have my full special database from xampp how can i use this on wordpress?
- Does WordPress Support Using Named Pipes on the Windows Operating System?
- One WP Database outside localhost and two connections
- Local Content different from Remote Content
- Get id from database
- Show WP content on different PHP Sites
- Share WordPress Database
- MySQL Database User: Which Privileges are needed?
- Update references to pictures on website after moving to new URL
- Trying to edit a WP site locally using MAMP
- Display custom data based on URL slug
- Relaunch 4.2 utf8mb4 database upgrade
- Get error messages when $wpdb->insert() returns false?
- Where can I find the database changes between WordPress versions?
- Backup the Database and Restore from the Backup?
- $wpdb variable throw this error Call to a member function get_results() on a non-object in
- Extend the wp_users table
- I have a problem with my WordPress DB after I tried to install multi-site
- Database error Deadlock found when trying to get lock; try restarting
- Connect Second Database to WordPress
- update_user_meta() does not work
- Query from a different database than the default
- Check if column exists for one table in DB
- Switching database on the fly
- Allow logged in users to store and display some data
- Replace/Mute/Stop Search Query
- How to merge two WordPress databases with the same structure?
- Finding the original login information in the database
- How to prevent/delay MySQL connections when an object cache is used?
- How to set up WordPress in the intranet?
- “Error establishing a database connection” – Intermittent error on GoDaddy
- Importing Direct to DB – GUID Question
- WordPress site to be able to connect with data on local machine of user
- How to connect and insert data in database of wordpress?
- WordPress as a frontend website for iOS app [closed]
- wp_option table error while importing
- What is wrong here? Issue with post_id and meta_value
- Deleting empty meta key values
- WP 5.5, child themes, customizer and a weird cache issue
- New Page/Post Screen Opens an Existing Post
- Best way to store 1 billion+ posts?
- What’s the easiest way to connect external database and display data on wordpress?
- Character encoding issue – black diamond question marks on imported post excerpts
- Reinstall wordpress/mySQL caused database problem
- Call to a member function insert()
- Create a new table on the database and save parameters from a contact form
- How to have WP Search widget index dynamically generated content?
- Preventing concurrent update of data
- Changing starting number of User ID
- Creating Tables in WordPress Database
- Calling update_user_meta inside of another function doesn’t work
- $wpdb->prepare returns empty array
- Prevent creation of unused database tables?
- How to store a plain password in WordPress database in another field