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:
- Can local WordPress installs share /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
- get_results using wpdb
- How to create bulk page and content? [closed]
- Transient RSS feeds in wp_options not removed automatically?
- Best way to move live site local
- The revisions table in my database is at 70% capacity and growing. What should I do?
- WordPress for a very large website
- Database location in WordPress
- WooCommerce with thousands of products – site is very slow – optimize db queries? [closed]
- Retrieve and display data from custom db table in admin area?
- How to execute mulitple statement SQL queries using $wpdb->query?
- Store and Encrypt Contact Form 7 Submissions in Database? [closed]
- WordPress database growing dramatically in size despite adding no new content
- Clean database from unused tables
- How wordpress accesses its own database
- Migrating database / content of non-CMS site to WordPress
- Show last modified date of database
- What generates these very slow postmeta queries? [closed]
- Automatically wrap multiple images in div
- How to scan barcode and store data into a database [closed]
- Fetching values from database for select box
- fastest replacement DB
- When to use custom DB tables or add_option?
- Have working sql query… trying to adjust it to use $wpdb
- Best host for running large mem and processor intensive WordPress sites?
- Does WordPress store the username as a primary key in the database?
- Strange characters added to the database
- Database Update Required – Update from command-line
- Custom search query by category id
- multiple wordpress installs w/shared user database but separate content databases
- Updating seperate database when post attachment is changed
- add featured image dialog box disappear
- WordPress Database – wp_usermeta and the correct number of session_tokens rows
- How to get a list of articles related to a particular category from my other WordPress website?
- What is my error trying to create a new table in the database?
- How do I update a WordPress wp_postmeta meta_value that contains many options
- How can I get $wpdb to show MySQL warnings?
- About wp database hooks (error establishing connection)
- Check if values exists DB
- DB access blocked when initializing WP externally
- Site does not work right, pages not showing up, even for root admin
- WordPress: Interact with Database Query Data and Login
- Getting an error when trying to migrate to DV server from Grid with Media Temple [closed]
- Advice how to connect custom database with WordPress, change data in WordPress and finaly use this data