I recently set up a new WordPress based website and local Docker-based development environment. This post documents what I did, so that I can do it again next time! As I'm not in the WordPress world, many things are strange to me and I'm indebted to Jenny Wong for pointing me in the right direction on numerous occasions and being very patient with my questions! Thanks Jenny!
Project organisation
There's always ancillary files and directories in a project that aren't part of the actual website, so I have put the WordPress site in a subdirectory called app and then I have room for other stuff. My project's root directory looks like this:
$ tree . --dirsfirst -FL 1
.
├── app/
├── bin/
├── data/
├── docker/
├── README.md
└── docker-compose.yml
This is what each item is for:
- app/ – The WordPress application files are in this directory.
- bin/ – Useful command-line scripts
- data/ – MySQL dump files go here.
- docker/ – Files required by the Docker setup are in this directory.
- README.md – Every project needs a README!
- docker-compose.yml – Development orchestration config file.
I put everything into git, with a .gitignore file to ignore everything in data along with various other WordPress files/directories that shouldn't in version control.
Docker
A pair of Docker containers is used to run the site locally for development. I'm slowly getting my feet wet with Docker, so I'm not sure if this is the best way to do things. The docker-compose command allows you to spin up multiple containers in one go and join them together. This is done via the docker-compose.yml file.
Mine looks like this:
docker-compose.yml:
version: '3'
services:
db:
image: mysql:5.7
ports:
- 127.0.0.1:3306:3306
command: [
'--default_authentication_plugin=mysql_native_password',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_DATABASE: wordpress
MYSQL_ROOT_PASSWORD: 123456
wp:
build:
context: ./docker
dockerfile: Dockerfile-wp
ports:
- 127.0.0.1:80:80
volumes:
- ./docker/php.conf.ini:/usr/local/etc/php/conf.d/conf.ini
- ./app:/var/www/html
depends_on:
- db
links:
- db
environment:
DB_NAME: wordpress
DB_USER: root
DB_PASSWORD: 123456
DB_HOST: db
WP_DEBUG: 1
LIVE_URL: https://project1.com
DEV_URL: http://dev.project1.com
volumes:
db_data: # store database into a volume so that we can pause the containers
There are two containers: wp for the Apache/PHP and db for the MySQL.
The db container
The db container uses the default Docker MySQL container. I picked version 5.7 as that's what's running in my live environment. As this is a single-purpose development container, I just use the MySQL root user and set its password.
I want to persist the MySQL database between invocations of the container, so to do this, I create a volume called db_data and then map the /var/lib/mysql directory to that volume. I also expose MySQL on 3306 so that I can connect to it from my desktop.
The wp container
For the wp container, I start with the default Docker WordPress container and add XDebug and the WP-CLI to it. This is done in the ./docker/Dockerfile-wp file:
./docker/Dockerfile-wp:
FROM wordpress:php7.3-apache
# Install xdebug
RUN pecl install xdebug && docker-php-ext-enable xdebug
# Install Less for WP-CLI
RUN apt-get update && apt-get -y install less
# Install WP-CLI
RUN curl -s -o /usr/local/bin/wp \
https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& chmod +x /usr/local/bin/wp
docker-compose will now create a container from our Dockerfile-wp and use that.
I map the docker/php.conf.ini into the container so that the PHP picks up our additional php.ini configuration settings:
docker/php.conf.ini:
upload_max_filesize = 10M
post_max_size = 10M
xdebug.overload_var_dump = 1
xdebug.remote_enable = 1
xdebug.remote_autostart = 0
xdebug.remote_connect_back =
Truncated by Planet PHP, read more at the original (another 5805 bytes)
PHP Internals News: Episode 21: str_starts_with() and friends
London, UK
Thursday, August 1st 2019, 09:21 BST
In this episode of "PHP Internals News" I chat with Will Hudgins (LinkedIn, Website, GitHub) about his "Add str_starts_with(), str_ends_with() and related functions" RFC.
The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news
Confidence is among the most important traits for a web designer. It’s part of what propels us forward and enables us to create amazing things. Yet, it’s also quite volatile. It can either appear or vanish in the blink of an eye.
Over the years I’ve found the ability to maintain self-confidence as one of my biggest challenges. Sometimes it seems to be overflowing, while in other situations it’s difficult to find even a drop. In talking with others, I have learned that I’m far from alone in this experience.
So, why is confidence so difficult to build up and retain? And, what can we do to bring it back?
Frozen in Fear?
Fear is both a symptom and a side effect. When we’re afraid, then we are probably not feeling very confident. As a result, we often don’t take the initiative. For example, we may be hesitant when it comes to finding new clients. Or perhaps we simply don’t act on an otherwise exciting idea or opportunity.
As if that weren’t bad enough, this inaction can do even further damage. Because we are afraid to take that next step, confidence can continue to sink (while feelings of guilt rise up). This can lead to finding yourself in a serious rut.
I’ve found this to be true in my own journey. Often, it takes the form of the infamous imposter syndrome. I tend to feel as though I’m not the best person to carry out a client’s vision or that it would be impossible for me to learn a specific skill. Every task seems to be insurmountable. The result is crippling when it comes to decision-making.
This is where it’s worth noting that there may be some times when a project or idea just isn’t a good fit. The difference is in how we approach the situation.
Fear often has us rejecting something without much consideration as to what’s actually involved. A lack of critical thought and analysis is what stands out. In other words: Without taking the time to fully research an opportunity, we may be selling ourselves short.
Therefore, taking a deep breath and some time to think things over can help us overcome those pesky doubts.
![Woman looking out a window.](https://speckyboy.com/wp-content/uploads/2019/07/building-confidence-01.jpg)
Find Your Favorite Remedy
Thankfully, there are some things you can do to boost your confidence when reserves are running low. Here are a few possible remedies to help you get your groove back:
Learn
There is a certain joy that comes with learning. It offers an activity that you can really immerse yourself in. And, as you start to understand new concepts and put them into practice, the excitement of it all can bring confidence roaring back.
Quite often, you’ll find yourself eager to implement what you’ve learned into a project. That leads us to the next confidence-boosting activity.
Experiment
One of the best ways to bust out of a funk is to put yourself to work on something a little different. If you enjoy code (or want to learn), perhaps playing with some new CSS or JavaScript techniques might do the trick.
If, on the other hand, you enjoy doing more visual work, open up your favorite image editor and create something. Design a killer logo or even a website mockup. The project doesn’t matter so much as the experimentation process itself.
Seek Inspiration
Inspiration is a very personal thing, in that everyone is buoyed by something different. You might find it in taking a trip outdoors, while others recharge themselves by checking out the latest design trends. Some may prefer to escape with a good book or a movie. The point is to find something that works for you and enjoy!
![Man sitting at a computer, petting a dog.](https://speckyboy.com/wp-content/uploads/2019/07/building-confidence-02.jpg)
The Common Denominator
Working in a creative field such as web design, it seems only natural that confidence will ebb and flow. Design and development aren’t easy, and there is no shortage of obstacles in our way. Sometimes, they can get the better of us. But that doesn’t mean we have to take it lying down.
While each of the remedies above are different, they all have at least one thing in common: They require us to take some action. When you’re struggling with confidence, attempting to press along that same path can be very difficult – and might even make you feel worse.
Therefore, it’s important to find something that brings a change of pace. It will help to put you in a better frame of mind and feel like you can accomplish anything.
The post Want to Build Confidence in Your Design Skills? Do Something! appeared first on Speckyboy Design Magazine.
What is a Keto Diet?
A ketogenic diet, is a high-fat, adequate-protein, low-carb diet. The purpose of the diet is to get more calories from protein and fat that from carbs. Ketosis is a normal metabolic process that occurs in the body, it works by depleting your body of it’s sugar storage, so after if starts to break down protein and fat for energy, causing weight loss. Some keto diet benefits include:
- Weight loss
- Reduce acne
- Improves heart health
- Improves health in women with PCOS
- Enhance Energy Levels
- Increase Body’s Ability to Turn Fat to Fuel for Weight Loss
- Promotes Ketosis
Keto Supplements
These are known to aid ketogenic dieters. Ketone supplements are not anything new for 2019, but they have been increasing in popularity over the past couple of years. Popular talk show host Dr Oz, has featured these supplements in numerous segments on his talk show. Revealing how ketones can help individuals in losing weight.
About Balanced Body Keto Ingredients
- BHB;- It is an amazing and primary ingredient in every keto based product. This ingredient plays an important role in operating ketosis process. Without this ingredient every keto based product is useless.
- Raspberry ketones;- These ketones are helpful in cutting down excess fatty layers. It also increases the metabolic weight in order to improve fat burning process.
- Garcinia cambogia;- This ingredient is so popular in improving the metabolism system. It includes HCA that helps to control on eating habits. In fact, it is also responsible for slim and healthy body.
Balanced Body Keto contains Beta-hydroxybutyrate. BHB is the first substrate that kicks the metabolic state of ketosis resulting in energy.
Beta-hydroxybutyrate floats around in your blood, and importantly, can cross different important barriers to be able to be turned into energy at all times. One of the most important areas where this happens is in the brain. The blood-brain barrier (BBB) is usually regulated, but since BHB is such a rock star and so hydrophilic, your brain knows to let it in so it can bring energy to the party at any time. This is one of the main reasons why increased BHB levels lead to heightened mental acuity.
Claims and Warrants
Everything has a disclaimer to it, so nothing has been fully tested in clinical trials. But the organization explains the importance of the keto diet and argues that users on their supplement can expect to experience dramatic weight loss. However, with the absence of definitive and dedicated studies on this particular supplement, these claims are difficult to corroborate.
Balanced Body Keto Conclusion
While the listing for Balanced Body Keto has a high number of positive reviews, its hard for us to say these are all legit product reviewers. Some may be, some may not be.
The organization requests fairly cheap prices for their supplement compared to others on the internet. As always consumers who try these supplements are encouraged to review the product online, so that they can add to the existing research-base for keto supplement products and companies.
Update Incoming!
We will try and email the Balanced Body Keto support team to find out more information and bring transparency to this ketone weight loss supplement. Be sure to check back on our website for updated information on Balanced Body Keto.
To help you reach your weight loss goals, we suggest you read our guides that link to the top products that are currently on the market; Superfood drinks, detox cleanses, prebiotics, and the best fat burners.
![](http://weightlossdietsolutions.com/wp-content/plugins/rss-poster/cache/b687d_best-keto.png)
Affiliate Link
Article source: https://timesofhealth.com/keto-ignite/
What is a Keto Diet?
A ketogenic diet, is a high-fat, adequate-protein, low-carb diet. The purpose of the diet is to get more calories from protein and fat that from carbs. Ketosis is a normal metabolic process that occurs in the body, it works by depleting your body of it’s sugar storage, so after if starts to break down protein and fat for energy, causing weight loss. Some keto diet benefits include:
- Weight loss
- Reduce acne
- Improves heart health
- Improves health in women with PCOS
- Enhance Energy Levels
- Increase Body’s Ability to Turn Fat to Fuel for Weight Loss
- Promotes Ketosis
Keto Supplements
These are known to aid ketogenic dieters. Ketone supplements are not anything new for 2019, but they have been increasing in popularity over the past couple of years. Popular talk show host Dr Oz, has featured these supplements in numerous segments on his talk show. Revealing how ketones can help individuals in losing weight.
About Balanced Body Keto Ingredients
- BHB;- It is an amazing and primary ingredient in every keto based product. This ingredient plays an important role in operating ketosis process. Without this ingredient every keto based product is useless.
- Raspberry ketones;- These ketones are helpful in cutting down excess fatty layers. It also increases the metabolic weight in order to improve fat burning process.
- Garcinia cambogia;- This ingredient is so popular in improving the metabolism system. It includes HCA that helps to control on eating habits. In fact, it is also responsible for slim and healthy body.
Balanced Body Keto contains Beta-hydroxybutyrate. BHB is the first substrate that kicks the metabolic state of ketosis resulting in energy.
Beta-hydroxybutyrate floats around in your blood, and importantly, can cross different important barriers to be able to be turned into energy at all times. One of the most important areas where this happens is in the brain. The blood-brain barrier (BBB) is usually regulated, but since BHB is such a rock star and so hydrophilic, your brain knows to let it in so it can bring energy to the party at any time. This is one of the main reasons why increased BHB levels lead to heightened mental acuity.
Claims and Warrants
Everything has a disclaimer to it, so nothing has been fully tested in clinical trials. But the organization explains the importance of the keto diet and argues that users on their supplement can expect to experience dramatic weight loss. However, with the absence of definitive and dedicated studies on this particular supplement, these claims are difficult to corroborate.
Balanced Body Keto Conclusion
While the listing for Balanced Body Keto has a high number of positive reviews, its hard for us to say these are all legit product reviewers. Some may be, some may not be.
The organization requests fairly cheap prices for their supplement compared to others on the internet. As always consumers who try these supplements are encouraged to review the product online, so that they can add to the existing research-base for keto supplement products and companies.
Update Incoming!
We will try and email the Balanced Body Keto support team to find out more information and bring transparency to this ketone weight loss supplement. Be sure to check back on our website for updated information on Balanced Body Keto.
To help you reach your weight loss goals, we suggest you read our guides that link to the top products that are currently on the market; Superfood drinks, detox cleanses, prebiotics, and the best fat burners.
![](http://weightlossdietsolutions.com/wp-content/plugins/rss-poster/cache/267d8_best-keto.png)
Affiliate Link
Article source: https://timesofhealth.com/simply-fit-keto/
Package:
Summary:
Display data types like human-readable JSON values
Groups:
Author:
Description:
This class can display data types like human-readable JSON values...
Read more at https://www.phpclasses.org/package/11309-PHP-Display-data-types-like-human-readable-JSON-values.html#2019-07-31-18:54:42
The PHP development team announces the immediate availability of PHP 7.1.31. This is a security release.All PHP 7.1 users are encouraged to upgrade to this version.For source downloads of PHP 7.1.31 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
The PHP development team announces the immediate availability of PHP 7.2.21. This is a security release which also contains several minor bug fixes.All PHP 7.2 users are encouraged to upgrade to this version.For source downloads of PHP 7.2.21 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
The PHP development team announces the immediate availability of PHP 7.3.8. This is a security release which also contains several bug fixes.All PHP 7.3 users are encouraged to upgrade to this version.For source downloads of PHP 7.3.8 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
@gonedark
Show Notes
Laravel Shift
BaseCode
Audio
This episode is sponsored by Uncle Cal's Career Advice for Developers
The post Interview with Jason McCreary appeared first on Voices of the ElePHPant.