Wordpress News

WPTavern: Jetpack 5.8 Adds Lazy Loading for Images Module

Wordpress Planet - Fri, 02/09/2018 - 07:54

Jetpack 5.8 is available for download and includes a handful of new features for Professional, Premium, and Personal plan users. In October of last year, Jetpack 5.4 began beta testing a new search module based on Elasticsearch. Jetpack 5.8 concludes the beta and the new search service is available to Professional plan customers.

The new search module replaces the native search functionality in WordPress and Jetpack developers claim sites with a large amount of content, images, or products will see significant speed improvements and more relevant results. Developers can fine-tune the user experience by using custom queries and template tags. Users can sort results by categories, tags, month/year, post type, or any taxonomy.

In addition to the Content Delivery Network, users have another method to optimize their sites with a new module named Lazy Load Images. When activated, Jetpack will display a page’s textual content first. When a user scrolls down the page, Jetpack will request and download images so they appear when that section of the page comes into view. Sites with a large amount of images will benefit most from having this module activated.

Premium plan customers can now perform security scans on their sites at any time, upload an unlimited amount of videos, and access SEO tools that were once restricted to Business plan customers.

Other notable improvements include:

  • Support for timezone and site language settings
  • Improved display of notices
  • The GettyImages shortcode now uses the new format required by GettyImages

To view all of the additions in this release, check out the Jetpack 5.8 changelog.

Matt: The Laity

Wordpress Planet - Thu, 02/08/2018 - 21:48

In the last analysis, every profession is a conspiracy against the laity.

The Sir Patrick Cullen character in George Bernard Shaw’s play The Doctor’s Dilemma

WPTavern: WPWeekly Episode 304 – DesktopServer, Life, and Health with Marc Benzakein

Wordpress Planet - Thu, 02/08/2018 - 01:48

In this episode, John James Jacoby and I are joined by Marc Benzakein, Operations Manager for ServerPress, LLC. We discussed recent updates to DesktopServer and received a progress report on 4.0. Marc also shared some of the struggles the team encountered throughout 2017.

We learned what’s new with WP SiteSync and what customers can look forward too later this year. We also talked about Marc’s journey of becoming a healthier person both physically and mentally. He recalls the issues he had to overcome and shares advice on how others can improve their health.

Stories Discussed:

WooCommerce 3.3.1 Released, Addresses Template Conflicts
WordPress 4.9.4 Fixes Critical Auto Update Bug in 4.9.3
Unpatched DoS Flaw Could Help Anyone Take Down WordPress Websites

WPWeekly Meta:

Next Episode: Wednesday, February 14th 3:00 P.M. Eastern

Subscribe to WordPress Weekly via Itunes

Subscribe to WordPress Weekly via RSS

Subscribe to WordPress Weekly via Stitcher Radio

Subscribe to WordPress Weekly via Google Play

Listen To Episode #304:

HeroPress: Becoming a Better Designer Through WordPress

Wordpress Planet - Wed, 02/07/2018 - 12:00
The early years

I’ve always been an art kid. One of my first school memories is of drawing a clown and my art teacher being so enamored with it, she hung it up on her door for the whole year.

The first time in my educational life I didn’t take an art class was my first year of college. By the end of the year, my fingers were itching and I was ready to scream — I had to take art. It didn’t take long for me to declare a Studio Art minor, which eventually became an Arts and Technology minor my senior year.

I’ve also always been an internet kid. We received our first internet-connected Windows desktop in 1997. I’ll never forget the sound of dial-up as I signed into AOL, day after day for years to come. When my older brother started working for an ISP, we were able to go beyond just using AOL to connect, and I started spending more time exploring websites (rather than just AOL’s apps and chat rooms). I wanted to be like my older brother and learn how to make sites. I taught myself basic HTML by using View Source on existing sites — even back then, I was benefiting from the open web!

Angelfire was my earliest web canvas. A couple of my friends eventually got into making websites, but I was always a little disdainful of them for using Homestead’s GUI builder, while I was making my sites from scratch. I had a blast making image-rich personal and fan sites with tables and HTML styles. Landing a copy of Photoshop Elements in high school only intensified my enjoyment of web design. I kept that passion up through college, when I found my first design gig.

Could this be a career?

My first year of college got off to a bit of a rough financial start. By the time my financial aid was finalized and I was finally able to pick a work study job, my options were pretty limited. A dance professor needed an assistant to help her with some photocopying and organization tasks, along with helping her build out a print and web portfolio.

I was honestly a terrible assistant, but I did a pretty good job with the design work. I continued to refine my skills working in the computers labs in subsequent years, and in my Junior year of college (ten years ago!) I landed an internship at a local web design agency. That internship turned into a part-time job, which opened up doors to more local web design opportunities, and soon I was graduating college and pretty well situated into the start of my career.

It was at these agencies that I started learning how to build WordPress websites. I’d used WordPress a couple times in college and felt comfortable with it, but now I was focusing a lot more on building my skills as a designer and front-end developer. My girlfriend (who was working at the same web agency) and I managed to convince our boss to start letting us create totally custom websites, rather than customizing existing themes, and that opened up a whole new world of design opportunities.

My first WordCamp

It was around then that my girlfriend, who attended WordCamp NYC the previous year, noticed the conference organizers were looking for some volunteer designers to help create some graphics. She passed along the information, and I got in touch.

I collaborated with a few other designers to create the WordCamp branding, which was used across the website, t-shirt, signage, and stickers:

It was amazing to see it everywhere at the WordCamp. It felt really special. Though I didn’t get “props” for this, I still consider it my first contribution to WordPress.

WordCamp NYC was a ton of fun. I met interesting people, learned a lot about WordPress, and started to get a feel for the community. I left with a desire to get more involved. I browsed through WordPress.org, stumbling upon the “Make” section. I was stoked to see that there was a design group. I couldn’t write much code beyond CSS, but I could contribute my design skills. I joined a couple of the core channels on IRC, including the design channel (#wordpress-ui), and observed for while. I watched how the other designers in the project communicated, what they worked on, where they presented their work, etc. By observing before participating, I could learn the social queues and mores of the community. I didn’t want to embarass myself — I wanted to do things the established way based on community standards.

What I found to be one of the most difficult parts of contributing was adapting to the technology used to build WordPress. I had to learn how to use command line and SVN. Getting set up in SVN and terminal was probably the biggest thing that stopped me from contributing code during my early years.

But most of all, it came down to conquering fear. Fear that my design skills would be unwanted and unwelcome; fear that other contributors would look down on me or ignore me, or that they’d find me irritating; fear that I just wasn’t good enough to contribute. Some of this fear persists today, albeit greatly reduced.

There’s a point at which I managed to conquer a little bit of that fear, stop observing, and really start to pitch in. Slowly, I started chiming in and volunteering for design tasks in IRC and the Make Design p2. I ended up doing a lot of small projects on the community side (rather than the core side) at first — some new landing pages and redesigns of sections on WordPress.org, graphics, and design for my own local meetups. I started feeling more and more confident with my contributions.

Core Props

By this point, I had done some wireframes and mockups for the core WordPress software — I’d even spoken at a WordCamp! — but I hadn’t actually gotten any code committed. Which meant, at this point in time, I didn’t have any “core props.” I was still really intimidated by Trac and SVN. I was a designer, and most design conversations happened in explicitly design space. But I really wanted to get some code committed into core, so I needed to find a CSS bug I felt qualified to fix.

At WordCamp Philly in 2012, I finally got a chance. Sunday was devoted to contributing to WordPress. There were experienced core contributors present who could teach people how to make a patch, how to submit a ticket, and suggest tickets for people to work on.

Aaron Jorbin, a core contributor and fellow speaker (and, now a friend), found a CSS issue I could work on: bringing the alternate “blue” color scheme into sync with the default “grey” scheme. He helped me get set up, helped me through saving my changes as a patch, and then helped me submit that patch to Trac. Andy Nacin, another core contributor (and future friend!) subsequently committed that patch, and I received my first core props.

After creating my first patch, contributing became easier and easier. My confidence grew, and I spent more time participating in IRC, p2s, and Trac discussions. Then, in January of 2013, major design changes started coming to WordPress.

My WordPress apprenticeship

It started with icons.

Ben Dunkle, WordPress’s official icon designer, proposed some shiny new icons for the WordPress dashboard. They were “flat” — one color, not a ton of details. The icons were awesome, but they didn’t really fit stylistically with the rest of the admin. The flat styles clashed with WordPress’ heavy use of gradients.

So, I helped imagine what the admin could look like totally flat. We tried out a couple ideas, got them committed, and refined in code. The stark styles looked really fresh after years of gradients!

Unfortunately, flattening the admin unearthed a whole lot of other issues. There wasn’t enough time to flesh out the new design before the next version of WordPress launched, so the flat styles got reverted and tabled for another time.

Pretty soon after, I received an email via my site’s contact form:

Name: Matt
Comment: Add me on Skype when you get a chance.

I think my heart stopped when I realized I had been emailed by the co-founder of WordPress, Matt Mullenweg. Matt invited me to come join a group that would take a broader look at redesigning the admin (codenamed “MP6”). It meant a lot for someone as important as Matt to recognize my skills. I spent a lot of my early years as a designer plagued with self-doubt, and suddenly I had someone pointing at me, going “I believe in you!”

I leapt at the chance.

Our group worked together on Skype. We quickly scoped the goal of MP6 to only update CSS and a little bit of JS. I helped Ben make some new vector icons, gave feedback and critiqued design proposals, and made some design proposals of my own. It was an intimate group where we all felt free to safely share and critique each other’s work. The mentorship I received from more experienced WordPress designers was invaluable to my growth. Working with these veterans of WordPress really helped me to grow into my fledgling wings.

WordPress 3.8 shipped with the updated admin interface, and I knew it was time to take my design career to a new level.

Leaving the nest

I’d had my eye on Automattic, the makers of WordPress.com, the Jetpack plugin, and many other products, for most of my time contributing to WordPress. A couple of the designers I worked with on MP6 were Automattic designers, and it was an absolute joy to collaborate with them. At this point I’d spent so much of my career as either a lone designer, or in a competitive environment, that having a supportive, collaborative group of people helping me improve my work was a revelation.

I desperately wanted to work at Automattic.

While MP6 was in the works, I participated in a three month long design apprenticeship at a local agency. I worked alongside experienced mentors and fellow apprentices to hone my interface and user experience design skills. It was challenging and thrilling and totally complemented the mentorship I was receiving from WordPress folks. Plus, working in a positive environment reinforced my desire to work somewhere similar.

After the apprenticeship, I finally felt like I had the skills and confidence to apply. I spent a lot of time writing my cover letter, and redesigning my portfolio to use in-depth case studies on a small number of recent projects. I finally sent off my application and crossed my fingers.

A couple weeks later, I received a reply back asking to schedule an interview. I was terrified, but luckily, Automattic conducts interviews via text, so I was able to hide my fear behind my keyboard and hopefully try to project confidence. (Aside: I also show all my emotions on my face, so online communication is the best.)

It must have worked, because I was moved on to the next phase of the application, doing a self-contained trial project, which was a whole ton of fun. I was able to put my recently refined research, interviewing, and user testing skills to use. I loved being given a real challenge to tackle. My trial went well, so I was moved along to the final interview with Matt Mullenweg. We spent a couple hours chatting on Skype, and at the end of our conversation I was given an offer. Welcome to Automattic!

After working so hard on my apprenticeship, and on MP6, joining Automattic felt incredibly validating. The work I put in, the mentorship I received, all of the collaboration, led to this moment. I felt like I had graduated from apprentice and was now embarking on my adventure as a design journeyman. And boy, has it been an adventure!

Design leadership

The past four and a half years at Automattic have been fantastic. I have the best coworkers anyone can ask for. I’ve worked with some incredibly talented and empathetic designers, whose guidance and feedback constantly encourage me to improve my skills.

I’ve continued to contribute to WordPress, slowly gaining more responsibility in the project the longer I stuck around. That’s the secret to becoming an open source leader, I discovered — decisions are made by the people who show up.

In 2016, I was asked to by the Release Design Lead for WordPress 4.5 “Coleman.” I worked alongside the other release leads to make design-related decisions that impacted the release. This was the first release we experimented with having a Design Lead. I felt like design finally had a seat at the table.

This continued to be the case last year, when Matt Mullenweg announced core focuses for the year: Editing, Customization, and the API. Both Editing and Customization had designers co-leading their focus. I was named the Customization co-lead. I’d been working on customization and site building on WordPress.com for over a year, so I had relevant experience.

I worked with my developer co-lead, Weston Ruter, on low-hanging fruit, most of which we released in WordPress 4.8. The release was smaller, focused more on improvements than new features. We made a lot of updates to widgets, which had been long neglected.

After that, we turned our sights to some more ambitious projects: drafting and scheduling changes in the Customizer, improvements to code editing in the WordPress admin, even more widget updates, and upgrades around the flow of changing themes and building menus for your site. We took a design-first approach to building out these new features, and I think it really shows in the work that we produced during the 4.9 release cycle, which Weston and I co-led.

WordPress 4.9 “Tipton” launched in November. Since then, I’ve pivoted to work on Gutenberg, the new editing experience for WordPress which should be released in 5.0. Once the editing experience wraps up, we’re going to start looking at how we can extend Gutenberg to cover site building and customization. It’s a big, audacious goal that I hope to pursue with caution, humility, and a spirit of adventure.

I owe WordPress a great deal. The connections I’ve made, the skills I’ve honed, and the mentorship I’ve received have all contributed to making me the designer I am today. I hope to give back for years to come!

The post Becoming a Better Designer Through WordPress appeared first on HeroPress.

WPTavern: WooCommerce 3.3.1 Released, Addresses Template Conflicts

Wordpress Planet - Wed, 02/07/2018 - 09:46

WooCommerce 3.3.1 is available and fixes template conflicts discovered in a handful of WordPress themes that forced the team to revert WooCommerce 3.3. The team reviewed handful of the most common themes running WooCommerce and tested them for compatibility with 3.3.1.

WooCommerce developers recommend that theme authors use hooks instead of template overrides to ensure maximum compatibility.

According to Mike Jolley, WooCommerce lead developer, this release highlighted issues with the template system’s extensibility and a disconnect between theme authors on external marketplaces. “We hope to find solutions to these problems in the near future,” Jolley said.

WooCommerce 3.3.1 has at least 90 commits. Users are encouraged to create a full-backup of their sites and then browse to Dashboard > Updates to update WooCommerce from within WordPress.

WPTavern: WordPress 4.9.4 Fixes Critical Auto Update Bug in 4.9.3

Wordpress Planet - Wed, 02/07/2018 - 09:19

Hours after WordPress 4.9.3 was released, the WordPress development team followed it up with 4.9.4 to fix a critical bug with the auto update process. The bug generates a fatal PHP error when WordPress attempts to update itself.

This error requires WordPress site owners and administrators to manually update to WordPress 4.9.4 by visiting your Dashboard and clicking the Update Now button on the Updates page. Alternatively, you can update by uploading the files via SFTP or by using WP-CLI.

Dion Hulse, WordPress lead developer, says managed hosts that apply updates automatically for their customers will be able to update sites as they normally do. This may explain why some users have reported that sites running 4.9.3 have automatically updated to 4.9.4 without issue.

The bug stems from an attempt to reduce the number of API calls made when the auto update cron job is run. Unfortunately, the code committed had unintended consequences. “It triggers a fatal error as not all of the dependencies of find_core_auto_update() are met,” Hulse said.

A postmortem will be published once the team determines how to prevent this mistake from happening in the future. “We don’t like bugs in WordPress any more than you do, and we’ll be taking steps to both increase automated coverage of our updates and improve tools to aid in the detection of similar bugs before they become an issue in the future,” Hulse said.

While WordPress 4.9.3 and 4.9.4 do not include any security fixes, it’s important to note that in order to receive automatic security updates in the future, sites using the 4.9 branch must be running at least 4.9.4. Older branches are unaffected.

WordPress 4.9.4 Maintenance Release

Wordpress News - Tue, 02/06/2018 - 16:17

WordPress 4.9.4 is now available.

This maintenance release fixes a severe bug in 4.9.3, which will cause sites that support automatic background updates to fail to update automatically, and will require action from you (or your host) for it to be updated to 4.9.4.

Four years ago with WordPress 3.7 “Basie”, we added the ability for WordPress to self-update, keeping your website secure and bug-free, even when you weren’t available to do it yourself. For four years it’s helped keep millions of installs updated with very few issues over that time. Unfortunately yesterdays 4.9.3 release contained a severe bug which was only discovered after release. The bug will cause WordPress to encounter an error when it attempts to update itself to WordPress 4.9.4, and will require an update to be performed through the WordPress dashboard or hosts update tools.

WordPress managed hosting companies who install updates automatically for their customers can install the update as normal, and we’ll be working with other hosts to ensure that as many customers of theirs who can be automatically updated to WordPress 4.9.4 can be.

For more technical details of the issue, we’ve posted on our Core Development blog. For a full list of changes, consult the list of tickets.

Download WordPress 4.9.4 or visit Dashboard → Updates and click “Update Now.”

Dev Blog: WordPress 4.9.4 Maintenance Release

Wordpress Planet - Tue, 02/06/2018 - 16:17

WordPress 4.9.4 is now available.

This maintenance release fixes a severe bug in 4.9.3, which will cause sites that support automatic background updates to fail to update automatically, and will require action from you (or your host) for it to be updated to 4.9.4.

Four years ago with WordPress 3.7 “Basie”, we added the ability for WordPress to self-update, keeping your website secure and bug-free, even when you weren’t available to do it yourself. For four years it’s helped keep millions of installs updated with very few issues over that time. Unfortunately yesterdays 4.9.3 release contained a severe bug which was only discovered after release. The bug will cause WordPress to encounter an error when it attempts to update itself to WordPress 4.9.4, and will require an update to be performed through the WordPress dashboard or hosts update tools.

WordPress managed hosting companies who install updates automatically for their customers can install the update as normal, and we’ll be working with other hosts to ensure that as many customers of theirs who can be automatically updated to WordPress 4.9.4 can be.

For more technical details of the issue, we’ve posted on our Core Development blog. For a full list of changes, consult the list of tickets.

Download WordPress 4.9.4 or visit Dashboard → Updates and click “Update Now.”

WPTavern: WordPress 4.9.3 Released, Fixes 34 Bugs

Wordpress Planet - Tue, 02/06/2018 - 08:35

WordPress 4.9.3 is available and fixes 34 bugs. Customizer changesets, the visual editor, widgets, and compatibility for PHP 7.2 highlight this release. You can view all of the changes via the changelog or trac tickets. Most sites will update automatically. However, if you want to trigger the update ahead of time or manually update, visit your Dashboard, click the Updates link, and click Update Now.

WPTavern: Liquid Web Acquires iThemes in Multi-Million Dollar Deal

Wordpress Planet - Tue, 02/06/2018 - 00:33

Liquid Web, a managed hosting service founded in 1997, has acquired iThemes. iThemes recently celebrated its 10th year in business. PostStatus reports that it was an all cash deal and sources confirmed to the Tavern that it was a multi-million dollar acquisition.

iThemes will continue to operate as an independent unit within Liquid Web. Cory Miller will remain as General Manager of iThemes and the company will keep its office and employees in Oklahoma City, OK.

iThemes was founded in 2008 and is part of a group of WordPress focused companies that started around the same time. The group includes WooThemes, Revolution Themes now known as StudioPress, Press75, WPZoom, and others.

WooThemes was acquired by Automattic. StudioPress has branched off into content marketing with CopyBlogger and hosting via StudioPress sites. Press75 was acquired by Westwerk in 2014 and WPZoom continues to operate independently.

iThemes diversified its business a number of times over the years, adding plugins and services to its portfolio. Some of the most notable products include, FlexxTheme, BackupBuddy, Builder, iThemes Sync, and iThemes Security. In 2013, the company branched off into the e-commerce space with Exchange. In 2017, Exchange was acquired by AJ Morris allowing the company to focus on iThemes Sales Accelerator, a new product that works exclusively with WooCommerce.

Considering Liquid Web recently launched its managed WooCommerce hosting, iThemes Sales Accelerator should pair nicely with its services.

This isn’t the first time a large webhosting company has acquired a WordPress business. In the last two years, GoDaddy has acquired three companies with a presence in the WordPress ecosystem.

  • April 2013 EIG Acquires MOJO-Themes
  • September 2016 GoDaddy Acquires ManageWP
  • December 2016 GoDaddy Acquires WP Curve
  • March 2017 GoDaddy Acquires Sucuri
After 10 Years, Cory Miller Lets Go

Miller founded iThemes 10 years ago and helped navigate it through the ups and downs that come with running a business. Although Miller no longer owns the company he founded, he’s excited about the next chapter and the opportunities it presents to him and his team.

“One of the keys that has contributed greatly to our success over the last 10 years is being willing to adapt and to innovate and to try new things,” Miller said. “For instance, If we’d kept focusing solely on WordPress themes, which was our primary business for the early years, we wouldn’t be around today.

“As we surveyed the landscape in WordPress, one thing was very obvious to us: hosting is the future. As a bootstrapped company from the beginning, with our DNA as a software company, and seeing where Liquid Web is going, it just made sense for us to join forces.

“We view this is as another chapter in our story of our willingness to adapt and try new things so we can keep doing what we do best — Make People’s Lives Awesome. So we’re tremendously excited about our future with Liquid Web, and what we’re going to be able to do for the WordPress community together.”

Miller says they’re in the middle of the transition process and are working towards tighter integration between iThemes’ products and Liquid Web’s managed hosting services.

WordPress 4.9.3 Maintenance Release

Wordpress News - Mon, 02/05/2018 - 19:47

WordPress 4.9.3 is now available.

This maintenance release fixes 34 bugs in 4.9, including fixes for Customizer changesets, widgets, visual editor, and PHP 7.2 compatibility. For a full list of changes, consult the list of tickets and the changelog.

Download WordPress 4.9.3 or visit Dashboard → Updates and click “Update Now.” Sites that support automatic background updates are already beginning to update automatically.

Thank you to everyone who contributed to WordPress 4.9.3:

Aaron Jorbin, abdullahramzan, Adam Silverstein, Andrea Fercia, andreiglingeanu, Andrew Ozz, Brandon Payton, Chetan Prajapati, coleh, Darko A7, David Cramer, David Herrera, Dion Hulse, Felix Arntz, Frank Klein, Gary Pendergast, Jb Audras, Jeffrey Paul, lizkarkoski, Marius L. J., mattyrob, Monika Rao, munyagu, ndavison, Nick Momrik, Peter Wilson, Rachel Baker, rishishah, Ryan Paul, Sami Ahmed Siddiqui, Sayed Taqui, Sean Hayes, Sergey Biryukov, Shawn Hooper, Stephen Edgar, Sultan Nasir Uddin, tigertech, and Weston Ruter.

Dev Blog: WordPress 4.9.3 Maintenance Release

Wordpress Planet - Mon, 02/05/2018 - 19:47

WordPress 4.9.3 is now available.

This maintenance release fixes 34 bugs in 4.9, including fixes for Customizer changesets, widgets, visual editor, and PHP 7.2 compatibility. For a full list of changes, consult the list of tickets and the changelog.

Download WordPress 4.9.3 or visit Dashboard → Updates and click “Update Now.” Sites that support automatic background updates are already beginning to update automatically.

Thank you to everyone who contributed to WordPress 4.9.3:

Aaron Jorbin, abdullahramzan, Adam Silverstein, Andrea Fercia, andreiglingeanu, Andrew Ozz, Brandon Payton, Chetan Prajapati, coleh, Darko A7, David Cramer, David Herrera, Dion Hulse, Felix Arntz, Frank Klein, Gary Pendergast, Jb Audras, Jeffrey Paul, lizkarkoski, Marius L. J., mattyrob, Monika Rao, munyagu, ndavison, Nick Momrik, Peter Wilson, Rachel Baker, rishishah, Ryan Paul, Sami Ahmed Siddiqui, Sayed Taqui, Sean Hayes, Sergey Biryukov, Shawn Hooper, Stephen Edgar, Sultan Nasir Uddin, tigertech, and Weston Ruter.

Mark Jaquith: Tips for configuring WordPress environments

Wordpress Planet - Mon, 02/05/2018 - 14:59

Many WordPress hosts will give your site a “staging” environment. You can also use tools like Local by Flywheel, or MAMP Pro to run a local “dev” version of your site. These are great ways of testing code changes, playing with new plugins, or making theme tweaks, without risking breaking your live “production” site.

Here is my advice for working with different WordPress environments.

Handling Credentials

The live (“production”) version of your site should be opt-in. That is, your site’s Git repo should not store production credentials in wp-config.php. You don’t want something to happen like when this developer accidentally connected to the production database and destroyed all the company data on his first day.

Instead of keeping database credentials in wp-config.php, have wp-config.php look for a local-config.php file. Replace the section that defines the database credentials with something like this:

if ( file_exists( __DIR__ . '/local-config.php' ) ) {     include( __DIR__ . '/local-config.php' ); } else {     die( 'local-config.php not found' ); }

Make sure you add local-config.php to your .gitignore so that no one commits their local version to the repo.

On production, you’ll create a local-config.php with production credentials. On staging or development environments, you’ll create a local-config.php with the credentials for those environments.

Production is a Choice

Right after the section that calls out local-config.php, put something like this:

if ( ! defined( 'WP_ENVIRONMENT' ) ) { define( 'WP_ENVIRONMENT', 'development' ); }

The idea here is that there will always be a WP_ENVIRONMENT constant available to you that tells you what kind of environment your site is being run in. In production, you will put this in local-config.php along with the database credentials:

define( 'WP_ENVIRONMENT', 'production' );

Now, in your theme, or your custom plugins, or other code, you can do things like this:

if ( 'production' === WP_ENVIRONMENT ) { add_filter( 'option_gravityformsaddon_gravityformsstripe_settings', function( $stripe_settings ) { $stripe_settings['api_mode'] = 'live'; return $stripe_settings; }); } else { add_filter( 'option_gravityformsaddon_gravityformsstripe_settings', function( $stripe_settings ) { $stripe_settings['api_mode'] = 'test'; return $stripe_settings; }); }

This bit of code is for the Easy Digital Downloads Stripe gateway plugin. It makes sure that on the production environment, the payment gateway is always in live mode, and the anywhere else, it is always in test mode. This protects against two very bad situations: connecting to live services from a test environment (which could result in customers being charged for test transactions) and connecting to test services from a live environment (which could prevent customers from purchasing products on your site).

You can also use this pattern to do things like hide Google Analytics on your test sites, or make sure debug plugins are only active on development sites (more on that, in a future post!)

Don’t rely on complicated procedures (“step 34: make sure you go into the Stripe settings and switch the site to test mode on your local test site”) — make these things explicit in code. Make it impossible to screw it up, and working on your sites will become faster and less stressful.

Do you need WordPress services?

Mark runs Covered Web Services which specializes in custom WordPress solutions with focuses on security, speed optimization, plugin development and customization, and complex migrations.

Please reach out to start a conversation!

[contact-form]

Varbase Theme

Drupal Themes - Mon, 02/05/2018 - 11:48

Tanara Theme for Drupal

Drupal Themes - Sun, 02/04/2018 - 10:36

Tanara Theme for Drupal

Kanekes Theme for Drupal

Drupal Themes - Sun, 02/04/2018 - 10:31

Kanekes Theme for Drupal

Matt: National Magazine Award Nomination

Wordpress Planet - Fri, 02/02/2018 - 21:37

Longreads was nominated today for its first-ever National Magazine Award, in the category of columns and commentary, alongside ESPN The Magazine, BuzzFeed News, Pitchfork, and New York magazine. Laurie Penny's Longreads columns explore important questions of consent and female desire that have strongly resonated in our current moment. In addition to this nomination, Penny's columns have been translated and republished in Italian and German newspapers, and will be collected in a forthcoming book.

The Month in WordPress: January 2018

Wordpress News - Fri, 02/02/2018 - 08:10

Things got off to a gradual start in 2018 with momentum starting to pick up over the course of the month. There were some notable developments in January, including a new point release and work being done on other important areas of the WordPress project.

WordPress 4.9.2 Security and Maintenance Release

On January 16, WordPress 4.9.2 was released to fix an important security issue with the media player, as well as a number of other smaller bugs. This release goes a long way to smoothing out the 4.9 release cycle with the next point release, v4.9.3, due in early February.

To get involved in building WordPress Core, jump into the #core channel in the Making WordPress Slack group, and follow the Core team blog.

Updated Plugin Directory Guidelines

At the end of 2017, the guidelines for the Plugin Directory received a significant update to make them clearer and expanded to address certain situations. This does not necessarily make these guidelines complete, but rather more user-friendly and practical; they govern how developers build plugins for the Plugin Directory, so they need to evolve with the global community that the Directory serves.

If you would like to contribute to these guidelines, you can make a pull request to the GitHub repository or email plugins@wordpress.org. You can also jump into the #pluginreview channel in the Making WordPress Slack group.

Further Reading:

If you have a story we should consider including in the next “Month in WordPress” post, please submit it here.

Dev Blog: The Month in WordPress: January 2018

Wordpress Planet - Fri, 02/02/2018 - 08:10

Things got off to a gradual start in 2018 with momentum starting to pick up over the course of the month. There were some notable developments in January, including a new point release and work being done on other important areas of the WordPress project.

WordPress 4.9.2 Security and Maintenance Release

On January 16, WordPress 4.9.2 was released to fix an important security issue with the media player, as well as a number of other smaller bugs. This release goes a long way to smoothing out the 4.9 release cycle with the next point release, v4.9.3, due in early February.

To get involved in building WordPress Core, jump into the #core channel in the Making WordPress Slack group, and follow the Core team blog.

Updated Plugin Directory Guidelines

At the end of 2017, the guidelines for the Plugin Directory received a significant update to make them clearer and expanded to address certain situations. This does not necessarily make these guidelines complete, but rather more user-friendly and practical; they govern how developers build plugins for the Plugin Directory, so they need to evolve with the global community that the Directory serves.

If you would like to contribute to these guidelines, you can make a pull request to the GitHub repository or email plugins@wordpress.org. You can also jump into the #pluginreview channel in the Making WordPress Slack group.

Further Reading:

If you have a story we should consider including in the next “Month in WordPress” post, please submit it here.

WPTavern: WordPress 4.9.3 Rescheduled for February 5th

Wordpress Planet - Fri, 02/02/2018 - 08:09

WordPress 4.9.3 is a maintenance release and was originally scheduled to be available on January 30th. However, due to ongoing tickets and a short time frame to test the release candidate, it has been pushed back to February 5th.

WordPress 4.9.3 RC 1 is available for testing. This release removes JSHint from the code editors due to conflicts with the GPL License. If your code relies on JSHint from Core, developers encourage you to update it to use a copy of JSHint.

Other changes in 4.9.3 include, avoiding page scrolling when navigating the media modal, a handful of improvements to the customizer, and more. Please test WordPress 4.9.3 on a staging site and if you encounter any bugs, you can report them on the Alpha/Beta section of the support forums.

Pages