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
- Search Character Set Problem
- Can’t log into wordpress site – I have made a new user and still cant access
- Need help with creating a searchable user data by name or specific number like ID
- Compare User meta_value with Product meta_value
- Storing transients giving database error
- I want to replicate a wordpress website over multiple servers
- White Screen in Home Page
- Error establishing a database connection in wordpress site , website not opening
- How to get the records from start with A to G in php and mysql
- WordPress Database – wp_usermeta and the correct number of session_tokens rows
- Is there any way to monitor a MySQL db and check what has changed?
- Counting post and changing roles in mysql database. Query not code
- $wpdb->insert not inserting all rows
- How to rename custom table name programatically in wordpress?
- Native timestamp on wp_options option
- Button to update database row from admin menu
- Woocommerce custom archive page custom content and shortcode
- Storing user’s data on external database on other server
- optimal taxonomy or custom post types
- Displaying requested data from a the database in wordpress
- How to save EXIF metadata in WordPress database?
- Accidently changed the GUID
- MSQL database wp_postmeta has meta key tve_revision
- Intentionally corrupt WordPress database
- Export WP Subsite DB Fully Ready for Import Elsewhere
- Sed Command Not Writing Changes to SQL file
- Continuous SQL query errors from outside source
- Is there anyway to split posts to different databases?
- wp-cli + valet: “Error establishing a database connection”
- How to escape percentage sign(%) in sql query with $wpdb->prepare?
- Link multiple user databases together?
- _wp_attachment_metadata is not being added to database when PDF files uploaded
- Best Practice? – Saving multiple Values as Serialized Data / Saving each Value per Row / Dedicated Table
- wpdb Insert unknown post data dynamic foreach loop
- How do I use a database in a custom theme?
- How do I get database rows from a custom table using wpdb?
- DB prefix not updating
- How to get a list of articles related to a particular category from my other WordPress website?
- SELECT rows between two datetimes when the range is dynamic [closed]
- Deleting empty meta key values
- is it right choose to connect database in template page directly in WordPress site?
- How to get the full stack trace for WordPress “table doesn’t exist” error in debug.log?
- How to insert a value to decimal type field using wpdb->prepare?