I wrote up a short tutorial in this other answer which goes into a little more detail, but I think you want to use docker-compose
to define any directories (volumes
) that you want to share between your local environment and the container environment. There may be a way to do this directly with Docker, but I think docker-compose
is a useful tool for this.
Sample docker-compose.yml
file:
wordpress:
image: wordpress
links:
- db:mysql
ports:
- 8080:80
volumes:
- .:/var/www/html/wp-content/themes/my-theme-name
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: example
Related Posts:
- Multiple WordPress sites with docker
- Does WordPress not use relative URLs?
- Volume mounts when setting up WordPress with docker [closed]
- Can I develop a WordPress site without a domain?
- Development environment
- Extend WordPress Core Classes in OOP Theme?
- How to do big modifications to live site?
- Custom Post Types database persistance. Why not?
- Localhost wordpress access remote db wordpress website
- Dockerized WordPress is having Nginx Proxy Issues
- Data sanitization: Best Practices with code examples
- Prevent WordPress from automatically installing a new theme each year
- Can we use one WordPress installation for multiple databases, domains and content directories
- How to Add Customizer Setting in Child Theme
- When adding a custom REST endpoint, where do you put the endpoint function, and where do you put the function registration call?
- WordPress objects class reference
- Customizing gallery shortcode in 3.5
- global menus made from master site’s custom menus wpmu network
- Capability to edit own posts and not others
- How do you add pages on a staging server, and then move them over to production
- Any Hook Called When Post Becomes Published?
- Automatically wrap post image in div
- Theme Twenty Fifteen: Customize Color Scheme Customizer
- Is there a way to create invisible pages?
- How to handle security on a wordpress site? [closed]
- Which freelance sites are recommended to find WordPress developers/programmers, etc
- Is it possible to set default values for custom fields in a custom post type while my plugin is being activated?
- Version control for both Vagrant config and themes being developed [closed]
- Problem with using wp-load.php outside of WordPress
- How to remove padding and margin between divi rows? [closed]
- Renaming wp_content problem
- Include user defined styles without including wp-load
- How to implement a custom password field that redirects to another page upon correct password?
- Preserve custom URL parameter after saving post
- add JS to multiple plugin admin pages
- Query posts by category AND custom field, then ORDERBY another custom field – help!
- Warning: Creating default object… when altering Customize panels
- Follow me for WordPress blogs (multi-authors)
- Pagination Issues using WP_Paginate Plugin
- WordPress customizer Preview not loading
- custom theme ,add media not showing images in media library
- Get Image from Media Library with the Title
- How to add an extra variable to login and authenticate it?
- Color swatches on category page? [closed]
- Theme Customization through admin panel. (Appearance-Customize)
- Best practice – pages – ACF or inline coding
- Diffrent User registration form for doctor and patient
- User can not login
- wpdb custom tables without plugin
- Add a searchbox to the body of a page
- Best way to allow overwriting images shipped with the plugin?
- How to put a site offline, including images?
- How to add css option to Header Image customizer?
- Static Front Page settings – distinguish between Front page and Post page
- str_replace inside specific css files [closed]
- How to print Array values of custom Fields Meta?
- Customizer JS API get value of customizer field
- Prevent Multisite from creating sample page, sample post and sample comments
- WordPress archive index page
- Hide content and functions from specific user roles
- Translating (WooCommerce) placeholder text
- How to make WordPress search page use a relative path
- Woocommerce custom archive page custom content and shortcode
- Page flickers in customization mode
- We are facing this error in header unable to understand the issue
- When is the wp-settings-[time] cookie generated?
- Get All Results From Other Users That Share The Same Custom User Meta As Current User
- Can we set a redirection with dynamic content in url?
- How to remove (…) from the post tilte on homepage?
- Need to add custom text field to Woocommerce under add to cart button
- Hide entry-header for a specific category
- Multiple loops on same category with different design
- How can I setup a development environment which auto refresh page when code have changed [closed]
- How Can I add show_post_count in get_archives_link?
- Trouble with custom login page
- I want to use a product thumbnail completely different than the product image
- How can I edit the WordPress menu link to allow fb: instead of http
- Fixed bottom menu on mobile doesn’t work on search included in Child Theme of Storefront
- Change Dashboard menu position?
- Get site ID from attachment url?
- Customize WP website specific column with CSS
- Help needed creating a custom Hamburger menu in header
- admin aoolbar add_node() and pulling in my post slug
- duplicate featured image functionality in custom meta box
- How to automatically pull an information from a form field onto an other page?
- How to create a custom menu for specific user
- Custom Form Input not saving to Database
- In wordpress customizer api adding div wrap to control
- How to create 2 preview button in a post?
- Move text from the side of image to below image [closed]
- Change the default WordPress image on the dashboard login to a custom image [duplicate]
- Custom terms in custom category taxonomy
- Customize TinyMCE Buttons
- Adding pages to the Admin panel
- Setting Custom WordPress “Posts page” AS “Front page”
- Custom Query Arguments
- Gallery Pagination by Row
- use another theme for just one page
- Instead of Custom CSS Theme CSS is loading
- How can I make a search term redirect to a page