Where Does WordPress Store Images on Your Site?

Are you wondering where does WordPress store images on your website? Many beginners users have asked us how does WordPress store images and what they can do to organize their media library more effectively. In this article, we will explain how WordPress stores images on… Read More »

The post Where Does WordPress Store Images on Your Site? appeared first on WPBeginner.

Are you wondering where does WordPress store images on your website? Many beginners users have asked us how does WordPress store images and what they can do to organize their media library more effectively. In this article, we will explain how WordPress stores images on your site.

Where does WordPress store images on your site

How Does WordPress Store Images?

WordPress comes with a built-in system to manage your media uploads like images, videos, music, documents, etc. This system allows you to upload, manage, edit, and delete files from your WordPress media library.

Media Library view in WordPress admin area

By default, WordPress stores all your images and media uploads in /wp-content/uploads/ folder on your server. All uploads are organized in a month and year based folders.

For example, all your media files uploaded in in March 2016 will be stored in:

/wp-content/uploads/2016/03/

You can view these folders by connecting to your WordPress site using an FTP client.

FTP view of uploads directory of a WordPress site

WordPress also adds information about your image uploads in the database. Information about your uploads is stored in database as a attachment post type under the posts table.

Database entry for attachment post type as seen in phpMyAdmin

WordPress also saves information in posts meta table when you insert images into posts/pages or any other custom post type.

When you set featured image also known as thumbnails, WordPress saves this information as a meta key _thumbnail_id and stores it in the postmeta table of your database.

Thumbnail ID meta key stored in postmeta table

Deleting your files from server using an FTP client will remove them from your server, but it will not remove them from the WordPress database. Those images will continue to appear on your WordPress site as broken images.

Similarly, if you delete references to your images and media uploads from database, then WordPress will stop showing them in the Media library. Even if all your images are intact and stored on your server.

Changing How WordPress Stores Images and Media Uploads

By default, WordPress does not allow you to change the uploads location from WordPress admin area. The only change you can make is to disable the month and year based folders by visiting Settings » Media page.

Organizing uploads in months and year based folders

Simply uncheck the box next to ‘Organize my uploads into month- and year-based folders’ option and save your changes. WordPress will start storing your files directly in /wp-content/uploads/ folder.

Advanced WordPress users can use a custom upload directory instead of the default location. See our guide on how to change the default media upload location in WordPress.

Organizing Your Images in WordPress

WordPress does not allow you to use custom folders when uploading your images. This makes it difficult for users to organize their images in a folder based structure.

However, you can use image tagging to organize your WordPress media uploads. WordPress gallery plugins like Envira Gallery make image organization easier with albums and image tags.

We hope this article helped you learn where does WordPress store images on your site. You may also want to see our guide on how to find royalty free images for your WordPress blog.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post Where Does WordPress Store Images on Your Site? appeared first on WPBeginner.

Developers can run Bash Shell and user-mode Ubuntu Linux binaries on Windows 10

As a web developer who uses Windows 10, sometimes I’ll end up browsing the web and stumble on some cool new open source command-line utility and see something like this:

A single lonely $

In that past, that $ prompt meant “not for me” as a Windows user.

I’d look for prompts like

C:>

or

PS C:>

Of course, I didn’t always find the prompts that worked like I did. But today at BUILD in the Day One keynote Kevin Gallo announced that you can now run “Bash on Ubuntu on Windows.” This is a new developer feature included in a Windows 10 “Anniversary” update (coming soon). It lets you run native user-mode Linux shells and command-line tools unchanged, on Windows.

After turning on Developer Mode in Windows Settings and adding the Feature, run you bash and are prompted to get Ubuntu on Windows from Canonical via the Windows Store, like this:

Installing Ubuntu on Windows

This isn’t Bash or Ubuntu running in a VM. This is a real native Bash Linux binary running on Windows itself. It’s fast and lightweight and it’s the real binaries. This is an genuine Ubuntu image on top of Windows with all the Linux tools I use like awk, sed, grep, vi, etc. It’s fast and it’s lightweight. The binaries are downloaded by you – using apt-get – just as on Linux, because it is Linux. You can apt-get and download other tools like Ruby, Redis, emacs, and on and on. This is brilliant for developers that use a diverse set of tools like me.

This runs on 64-bit Windows and doesn’t use virtual machines. Where does bash on Windows fit in to your life as a developer?

If you want to run Bash on Windows, you’ve historically had a few choices.

  • Cygwin – GNU command line utilities compiled for Win32 with great native Windows integration. But it’s not Linux.
  • HyperV and Ubuntu – Run an entire Linux VM (dedicating x gigs of RAM, and x gigs of disk) and then remote into it (RDP, VNC, ssh)
    • Docker is also an option to run a Linux container, under a HyperV VM

Running bash on Windows hits in the sweet spot. It behaves like Linux because it executes real Linux binaries. Just hit the Windows Key and type bash.

After you’re setup, run apt-get update and get a few developer packages. I wanted Redis and Emacs. I did an apt-get install emacs23 to get emacs. Note this is the actual emacs retrieved from Ubuntu’s feed.

Running emacs on Windows

Of course, I have no idea how to CLOSE emacs, so I’ll close the window. 😉

Note that this isn’t about Linux Servers or Server workloads. This is a developer-focused release that removes a major barrier for developers who want or need to use Linux tools as part of their workflow. Here I got Redis via apt-get and now I can run it in standalone mode.

Running Redis Standalone on Windows

I’m using bash to run Redis while writing ASP.NET apps in Visual Studio that use the Redis cache. I can then later deploy to Azure using the Azure Redis Cache, so it’s a very natural workflow for me.

Look how happy my Start Menu is now!

A happy start menu witih Ubuntu

Keep an eye out at http://blogs.msdn.microsoft.com/commandline for technical details in the coming weeks. There’s also some great updates to the underlying console with better support for control codes, ANSI, VT100, and lots more. This is an early developer experience and the team will be collection feedback and comments. You’ll find Ubuntu on Windows available to developers as a feature in a build Windows 10 coming soon. Expect some things to not work early on, but have fun exploring and seeing how bash on Ubuntu on Windows fits into your developer workflow!


Sponsor:  BUILD – it’s what being a developer is all about so do it the best you can. That’s why Stackify built Prefix. No .NET profiler is easier or more powerful. You’re 2 clicks and $0 away, so build on! prefix.io


© 2016 Scott Hanselman. All rights reserved.
     

As a web developer who uses Windows 10, sometimes I'll end up browsing the web and stumble on some cool new open source command-line utility and see something like this:

A single lonely $

In that past, that $ prompt meant "not for me" as a Windows user.

I'd look for prompts like

C:>

or

PS C:>

Of course, I didn't always find the prompts that worked like I did. But today at BUILD in the Day One keynote Kevin Gallo announced that you can now run "Bash on Ubuntu on Windows." This is a new developer feature included in a Windows 10 "Anniversary" update (coming soon). It lets you run native user-mode Linux shells and command-line tools unchanged, on Windows.

After turning on Developer Mode in Windows Settings and adding the Feature, run you bash and are prompted to get Ubuntu on Windows from Canonical via the Windows Store, like this:

Installing Ubuntu on Windows

This isn't Bash or Ubuntu running in a VM. This is a real native Bash Linux binary running on Windows itself. It's fast and lightweight and it's the real binaries. This is an genuine Ubuntu image on top of Windows with all the Linux tools I use like awk, sed, grep, vi, etc. It's fast and it's lightweight. The binaries are downloaded by you - using apt-get - just as on Linux, because it is Linux. You can apt-get and download other tools like Ruby, Redis, emacs, and on and on. This is brilliant for developers that use a diverse set of tools like me.

This runs on 64-bit Windows and doesn't use virtual machines. Where does bash on Windows fit in to your life as a developer?

If you want to run Bash on Windows, you've historically had a few choices.

  • Cygwin - GNU command line utilities compiled for Win32 with great native Windows integration. But it's not Linux.
  • HyperV and Ubuntu - Run an entire Linux VM (dedicating x gigs of RAM, and x gigs of disk) and then remote into it (RDP, VNC, ssh)
    • Docker is also an option to run a Linux container, under a HyperV VM

Running bash on Windows hits in the sweet spot. It behaves like Linux because it executes real Linux binaries. Just hit the Windows Key and type bash.

After you're setup, run apt-get update and get a few developer packages. I wanted Redis and Emacs. I did an apt-get install emacs23 to get emacs. Note this is the actual emacs retrieved from Ubuntu's feed.

Running emacs on Windows

Of course, I have no idea how to CLOSE emacs, so I'll close the window. ;)

Note that this isn't about Linux Servers or Server workloads. This is a developer-focused release that removes a major barrier for developers who want or need to use Linux tools as part of their workflow. Here I got Redis via apt-get and now I can run it in standalone mode.

Running Redis Standalone on Windows

I'm using bash to run Redis while writing ASP.NET apps in Visual Studio that use the Redis cache. I can then later deploy to Azure using the Azure Redis Cache, so it's a very natural workflow for me.

Look how happy my Start Menu is now!

A happy start menu witih Ubuntu

Keep an eye out at http://blogs.msdn.microsoft.com/commandline for technical details in the coming weeks. There's also some great updates to the underlying console with better support for control codes, ANSI, VT100, and lots more. This is an early developer experience and the team will be collection feedback and comments. You'll find Ubuntu on Windows available to developers as a feature in a build Windows 10 coming soon. Expect some things to not work early on, but have fun exploring and seeing how bash on Ubuntu on Windows fits into your developer workflow!


Sponsor:  BUILD - it’s what being a developer is all about so do it the best you can. That’s why Stackify built Prefix. No .NET profiler is easier or more powerful. You’re 2 clicks and $0 away, so build on! prefix.io



© 2016 Scott Hanselman. All rights reserved.
     

How to Add Facebook Like Reactions to Your WordPress Posts

Do you want to add Facebook like reactions to your WordPress blog posts? Emotional reactions allow users a way to provide quick feedback on your articles. In this article, we will show you how to add Facebook like reactions to your WordPress posts. What is… Read More »

The post How to Add Facebook Like Reactions to Your WordPress Posts appeared first on WPBeginner.

Do you want to add Facebook like reactions to your WordPress blog posts? Emotional reactions allow users a way to provide quick feedback on your articles. In this article, we will show you how to add Facebook like reactions to your WordPress posts.

Adding Facebook Type Reactions for WordPress Blog Posts

What is Reactions?

Facebook recently added more ways for users to show their reaction on posts in their timelines. Aside from just clicking like on the post, they can also show other expressions.

Facebook reactions

However this Facebook feature is not yet available for WordPress sites. You can still use the old Facebook like button.

However there are other WordPress plugins that allow you to engage readers with post reactions or with points system.

Since Facebook’s implementation is the fastest and more visually appealing, we found a WordPress plugin that allows you to add facebook like reactions to your WordPress posts..

Let’s see how you can add the functionality similar to Facebook reactions in your WordPress blog posts.

Setting up Emotional Reactions in WordPress

First thing you need to do is install and activate the DW Reactions plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » Reactions page to configure the plugin settings.

Reactions Settings

For automatic display of reactions in your blog posts, check the boxes next to Show reactions button and Show reactions count options.

By default, the plugin allows registered and logged in users to react. You can change that by unchecking the box next to ‘Users must be registered and logged in to add reaction’ option.

After that click on the Save changes button to store your plugin settings.

You can now visit your website to see the plugin in action.

Facebook type Reactions in WordPress

If you only want to show reactions on selected posts and pages, then you need to disable automatic display by unchecking the first two options in the plugin settings.

After that, you can use the [reactions] shortcode in your posts and pages where you want to display reactions.

That’s all, we hope this article helped you add Facebook like reactions to your WordPress blog posts. You may also want to see our guide on adding a post rating system in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Add Facebook Like Reactions to Your WordPress Posts appeared first on WPBeginner.

How to Create a Contact Form in WordPress (Step by Step)

Are you looking to add a contact form on your WordPress site? Every website needs a contact form, so people can contact you about your products and services. In this WordPress tutorial, we will show you how to create a contact form in WordPress (step… Read More »

The post How to Create a Contact Form in WordPress (Step by Step) appeared first on WPBeginner.

Are you looking to add a contact form on your WordPress site? Every website needs a contact form, so people can contact you about your products and services. In this WordPress tutorial, we will show you how to create a contact form in WordPress (step by step) without touching a single line of code.

Create contact form in WordPress

Why Do You Need a Contact form?

You might be wondering why do I need a contact form? Can’t I just add my email address on my website, so people can email me?

That’s a very common question from beginners because they are afraid that adding a contact form requires code knowledge. The truth is you don’t need to know any code. This step by step guide to adding a contact form is written for absolute beginners.

Below are the top 3 reasons why a contact form is better than pasting your email address on a page.

  • Spam Protection – Spam bots regularly scrape websites for the mailto: email address tag. When you post your email address on the website, you will start to receive a lot of spam emails. On the other hand, when you use a contact form, you can get rid of almost all spam emails.
  • Consistent Information – When emailing, people don’t always send you all the information that you need. With a contact form, you can tell the user exactly what information you’re looking for (such as their phone number, budget, etc).
  • Saves Time – Contact forms help you save time in more ways than you can imagine. Aside from consistent information that we mentioned above, you can also use form confirmations to tell the user what are the next steps. Such as watch a video or wait up to 24 hours to get a response, so they don’t send you multiple inquires.

Below is an example of a WordPress contact form that we will create in this tutorial.

Preview of a contact form in WordPress

After creating the form above, we will also show you how you can easily add it on your contact page, or in your site’s sidebar using a WordPress contact form widget.

Sounds good? Ok so let’s get started.

Step 1. Choosing the Best Contact Form Plugin

The first thing you need to do is choose a WordPress contact form plugin.

While there are several free and paid WordPress contact form plugins you can choose from, we use WPForms on our site and believe it’s the best option in the market.

Below are the three reasons why we think WPForms is the best:

  1. It is the most beginner friendly contact form plugin available. You can use the drag & drop builder to easily create a contact form in just a few clicks.
  2. WPForms Lite is 100% free, and you can use it to create a simple contact form.
  3. When you are ready for more powerful features, then you can upgrade to WPForms Pro.

Now that we have decided on the contact form plugin, let’s go ahead and install it on your site.

Step 2. Install a Contact Form Plugin in WordPress

For this contact form tutorial, we will use WPForms Lite because it’s free and easy to use.

You can install this plugin on your site by logging into your WordPress dashboard and going to Plugins » Add New.

Go to add new plugin page to search and install WPForms plugin

In the search field, type WPForms and then click on the Install Now button.

After the plugin is installed, make sure you activate the plugin.

Installing WPForms Plugin

If you don’t see the plugins menu or want more detailed instructions, then please refer to our step by step guide on how to install a WordPress plugin.

Step 3. Create a Contact Form in WordPress

Now that you have activated WPForms, you are ready to create a contact form in WordPress.

In your WordPress dashboard, click on the WPForms menu and go to Add New.

Adding a form in WordPress with WPForms

This will open the WPForms drag & drop form builder. Start by giving your contact form a name and then select your contact form template.

WPForms Lite only comes with two pre-built form templates (Blank or Simple Contact Form). But you can use these two to create just about any type of contact form you like.

For the sake of this example, we will go ahead and select Simple Contact Form. It will add the Name, Email, and Message fields.

Creating a new form in WordPress with WPForms

You can click on the field to edit them. You can also use your mouse to drag & drop the field order.

If you want to add new field, simply select from the available fields on the left.

Adding new fields to your form

When you’re done click on the Save button.

Step 4. Configuring Form Notification and Confirmations

Now that you have created your WordPress form, it’s important that you properly configure the form notification and form confirmation.

Form Confirmation is what your website visitor sees after they submit the form. It could be a thank you message or you can redirect them to a special page.

Form Notification is the email you get after someone submits the contact form on your WordPress site.

You can customize both of those by going to the Settings tab inside the WPForms form builder.

We usually leave the form confirmation as default Thank You message. However, you can change it to redirect to a specific page if you like.

Setting up form confirmation

The best part about WPForms is that the default settings are ideal for beginners. When you go the notification settings, all fields will be pre-filled dynamically.

Setting up form notifications

The notifications by default are sent to the Admin Email that you have setup on your site. If you want to send it to a custom email address, then you can change that. If you want to send the notification to multiple emails, then just separate each email address by comma.

The email subject is pre-fileld with your form name. The from name field is automatically populated with your user’s name. When you reply to the inquiry, it will go to the email that your user filled in the contact form.

Step 5. Adding WordPress Contact Form in a Page

Now that you are done configuring your WordPress contact form, it’s time to embed it in a page.

The first thing you need to do is either create a new page in WordPress or edit an existing page where you want to add the contact form.

We will be using the WordPress contact form shortcode to add the form in a page. Simply click on the Add Form button at the top and select the form you want to add.

Adding your contact form to a page in WordPress

A contact form shortcode will be added in your page content. Now go ahead and save your page to preview it.

Here’s what the form would look like on a sample WordPress page:

Preview of a contact form in WordPress

If you only wanted to add the contact form on page, then you’re done here. Congratulations.

If you want to add a contact form on a sidebar or another widget ready area, then go to step 6.

Step 6. Adding WordPress Contact Form in a Sidebar

WPForms come with a WordPress contact form widget that you can use to add your contact form in a sidebar or basically any other widget-ready area in your theme.

In your WordPress admin area, go to Appearance » Widgets. You will see a WPForms widget that you can easily drag into any widget ready areas of your theme.

Add form using a sidebar widget

Next, add the title for your widget and select the form you want to display. Save the settings, and visit your website for the preview.

We hope this article helped you create a simple contact form in WordPress. You may also want to check out our comparison of the 7 best WordPress backup plugins.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Create a Contact Form in WordPress (Step by Step) appeared first on WPBeginner.

How to Send Email in WordPress using the Gmail SMTP Server

Are you having trouble sending emails from your WordPress site? One easy way to solve this is by sending emails from WordPress using the Gmail SMTP server. In this article, we will show you how to send email in WordPress using the Gmail SMTP server.… Read More »

The post How to Send Email in WordPress using the Gmail SMTP Server appeared first on WPBeginner.

Are you having trouble sending emails from your WordPress site? One easy way to solve this is by sending emails from WordPress using the Gmail SMTP server. In this article, we will show you how to send email in WordPress using the Gmail SMTP server.

Send WordPress emails using Gmail smtp servers

Why and When You Need Gmail SMTP Server for WordPress Emails

Your WordPress site sends emails to notify you of new user registration, lost password reset, automatic updates, and even notifications from your contact forms.

By default, WordPress uses the PHP mail function to send out email notifications. However this function does not work as expected due to a number of reasons.

Most WordPress hosting companies restrict usage of this function to prevent abuse and spam.

Spam filters on popular email service providers check incoming emails to monitor if they are sent from an authentic mail servers. Default WordPress emails fail this check and sometimes may not even make it to the spam folder.

SMTP (Simple Mail Transfer Protocol) is the industry standard for sending emails. Unlike PHP mail function, SMTP uses proper authentication which increases email deliverability.

Gmail provides SMTP service that you can use to send out emails from your WordPress site. If you just want to send WordPress notification emails to yourself and few users on your site, then Gmail SMTP servers are the best option.

However, if you are planning on sending newsletter emails using WordPress, then you should use a mass emailing service provider, like MailGun or SendGrid.

Free vs Paid Gmail SMTP Service for WordPress

You can use your free Gmail account to send out WordPress emails. However, for better deliverability, we recommend using paid Google Apps for Work with Gmail.

With Google Apps for Work, you get your own professional branded email address such as ([email protected]).

Google Apps require you to add MX records to your domain name which means that your emails will appear to be coming from your own domain name boosting authenticity and ensuring better deliverability.

We use Google Apps for Work in our business, and can honestly say it’s the best.

How to Send WordPress Emails Using Gmail SMTP Server

If you decided to use Google Apps for Work, then you first need to set up your domain to work with Google Apps. We have a step by step tutorial on how to setup a professional email address with Google Apps and Gmail.

Rest of the instructions are the same whether you are using paid or free Gmail account.

There are two ways you can connect your WordPress site to Gmail SMTP servers.

The first method uses OAuth Authentication. This is a more secure method to send emails using Gmail Servers.

The second method is by allowing Gmail to be used with less secure apps. This method is not recommended because it’s less secure. You have to type in your gmail password in WordPress which is visible to all admin users. It should only be used if you are unable to use the first method.

Method 1: Setting up Gmail SMTP using OAuth Protocol

First thing you need to do is install and activate the Gmail SMTP plugin for WordPress. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » Gmail SMTP to configure the plugin settings.

Gmail SMTP plugin settings page

You will see a notice that requires you to create a web application with your Gmail account to generate API keys. These API keys will authenticate your site’s use of Gmail SMTP servers.

Creating an App and Generate API Keys for Gmail

First you need to click on the web application link provided in the plugin settings to create an app.

This link will take you to Google Developers Console website. You need to sign in with the gmail account that you want to use for sending WordPress emails.

Once you are logged in, a new project will be created for you with the Gmail API enabled in it.

Gmail API Enabled

Click on the go to credentials button to continue.

On the next screen, you will be asked where will you be calling the API from? You need to select Web Browser (Javascript) from the dropdown. Under ‘What data will you be accessing?’, select User Data.

Add credentials to your web app

After that click on the ‘What credentials do I need?’ button to continue.

Gmail API setup wizard will now ask you to provide the URL of website authorized to use this API. Under ‘Authorized JavaScript origins’ you need to enter the URL of your website.

Under ‘Authorized redirect URIs’, you need to paste the URL shown on Gmail SMTP plugin’s settings page in your WordPress dashboard.

Next, click on ‘Create client ID’ button to continue.

You will now reach OAuth Screen setup. Simply select your gmail address and provide a name for the App that is accessing your Gmail Account. In this case, it will be your own website name.

Setup OAuith Consent screen

Once you are done, click on the continue button to proceed.

You have successfully setup Gmail API with OAuth authentication enabled for it. You need to click on the Done button.

Set up complete for Gmail API

Now you will see the list of client IDs (apps) that you have created to access your Gmail API.

Click on the name of your website or project client to continue.

Client IDs

On the next screen, you will see the Client ID and Client Secret keys.

API Keys

Simply copy the keys and paste them in your Gmail SMTP plugin’s settings page on your WordPress site.

Gmail SMTP plugin settings

After that fill out rest of the plugin settings. You need to add your gmail email address in OAuth Email Address and From Email Address fields. You can enter your name or the name of your website in the ‘From Name’ field. In our emails, we use Syed from WPBeginner.

Next, select TLS for encryption and use 587 as port. Finally, click on the save changes button to store your settings.

After the plugin’s settings page reloads, you need to scroll down to the bottom and click on the Grant Permission button.

Grant permission

This will take you to Google Accounts where you will be asked to give your website permission to access your Gmail account. Click on the allow button to continue.

You will be redirected back to Gmail SMTP plugin’s settings page on your WordPress site. You will notice the SMTP Status icon has now turn green.

SMTP connected

That’s all, you have successfully setup WordPress emails to be sent using Gmail SMTP server. You can now click on the test email tab and send yourself a test email message.

Method 2: Setting up Gmail SMTP with Less Secure Apps Enabled

This method allows Gmail to be used with less secure apps. This method is not recommended and should only be used if you can’t use the first method.

Since security and spam is a main concern for most email service providers, it is likely that Google may discontinue this method at some point in the future.

If you are using Google Apps for Work, then here is how you can allow users to manage their access to less secure apps.

Visit your domain’s admin dashboard for Google Apps. Next, go to Security » Basic Settings and scroll down to less secure apps section.

Less secure apps settings in Google Apps

Click on ‘Go to settings for less secure apps’ link to continue.

On the next screen, check the option next to ‘Allow users to manage their access to less secure apps’. Don’t forget to click on the save button at the bottom right corner of the screen.

Rest of the instructions are the same for both paid and free Gmail accounts.

Simply visit the less secure apps settings page in your Google account settings and turn on access to less secure apps.

Turn on Less Secure Apps in Google Settings

Now that you have enabled less secure apps to access your Google account, it is time to setup your WordPress site to connect with Gmail SMTP servers using the less secure method.

First you need to install and activate the WP Mail SMTP plugin.

Upon activation, you need to visit Settings » Email page to configure the plugin settings.

WP SMTP Settings

Here is how to fill out the plugin settings:

  • From Email: Enter your Gmail address.
  • From Name: Enter your name or title of your website.
  • Mailer: Select ‘Send all WordPress emails via SMTP.
  • Return Path: Check the box to use the From email as return path.
  • SMTP Host: smtp.gmail.com
  • SMTP Port: 465
  • Encryption: Use SSL encryption
  • Authentication: Yes, use SMTP authentication
  • Username: Your complete Gmail address, e.g. [email protected] or [email protected]
  • Password: Password of your Gmail account

Click on the save changes button to store your settings.

After saving your settings scroll down to the bottom of the page, and you will see ‘Send a test email’ section. Enter an email address to see if everything is working fine.

That’s all, you have successfully setup your WordPress site to send emails using Gmail SMTP servers.

Troubleshooting Gmail SMTP Not Working Issues

We have seen issues of Gmail SMTP not working with certain shared hosting configurations.

Take the following steps to fix the Gmail SMTP issue:

  1. Login to your cPanel account and create an email account that matches your Google apps email address. This might seem strange because you’re not using your server, this step basically tricks your server into believing that you’re sending the email through the server.
  2. In your cPanel account, go to MX Records and change the MX routing from automatic to Remote. It might be a little tricky to find since each host now has custom cPanel interface, but look for a small link next to MX that says Email Routing: Remote Mail Exchanger.
  3. After that log back into your WordPress site and send a test email.

We hope this article helped you learn how to send email in WordPress using the Gmail SMTP server. You may also want to see our list of the 5 best contact form plugins for WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Send Email in WordPress using the Gmail SMTP Server appeared first on WPBeginner.

Docker for Windows Beta announced

I’m continuing to learn about Docker and how it works in a developer’s workflow (and Devops, and Production, etc as you move downstream). This week Docker released a beta of their new Docker for Mac and Docker. They’ve included OS native apps that run in the background (the “tray”) that make Docker easier to use and set up. Previously I needed to disable Hyper-V and use VirtualBox, but this new Docker app automates Hyper-V automatically which more easily fits into my workflow, especially if I’m using other Hyper-V features, like the free Visual Studio Android Emulator.

I signed up at http://beta.docker.com. Once installed, when you run the Docker app with Hyper-V enabled Docker automatically creates the Linux “mobylinux” VM you need in Hyper-V, sets it up and starts it up.

"Moby" the Docker VM running in Hyper-V

After Docker for Windows (Beta) is installed, you just run PowerShell or CMD and type “docker” and it’s already set up with the right PATH and Environment Variables and just works. It gets setup on your local machine as http://docker but the networking goes through Hyper -V, as it should.

The best part is that Docker for Windows supports “volume mounting” which means the container can see your code on your local device (they have a “wormhole” between the container and the host) which means you can do a “edit and refresh” type scenarios for development. In fact, Docker Tools for Visual Studio uses this feature – there’s more details on this “Edit and Refresh “support in Visual Studio here.

The Docker Tools for Visual Studio can be downloaded at http://aka.ms/dockertoolsforvs. It adds a lot of nice integration like this:

Docker in VS

This makes the combination of Docker for Windows + Docker Tools for Visual Studio pretty sweet. As far as the VS Tools for Docker go, support for Windows is coming soon, but for now, here’s what Version 0.10 of these tools support with a Linux container:

  • Docker assets for Debug and Release configurations are added to the project
  • A PowerShell script added to the project to coordinate the build and compose of containers, enabling you to extend them while keeping the Visual Studio designer experiences
  • F5 in Debug config, launches the PowerShell script to build and run your docker-compose.debug.yml file, with Volume Mapping configured
  • F5 in Release config launches the PowerShell script to build and run your docker-compose.release.yml file, with an image you can verify and push to your docker registry for deployment to other environment

You can read more about how Docker on Windows works at Steve Lasker’s Blog and also watch his video about Visual Studio’s support for Docker in his video on Ch9 and again, sign up for Docker Beta at http://beta.docker.com.


Sponsor: Thanks to Seq for sponsoring the feed this week! Need to make sense of complex or distributed apps? Structured logging helps your team cut through that complexity and resolve issues faster. Learn more about structured logging with Serilog and Seq at https://getseq.net.


© 2016 Scott Hanselman. All rights reserved.
     

I'm continuing to learn about Docker and how it works in a developer's workflow (and Devops, and Production, etc as you move downstream). This week Docker released a beta of their new Docker for Mac and Docker. They've included OS native apps that run in the background (the "tray") that make Docker easier to use and set up. Previously I needed to disable Hyper-V and use VirtualBox, but this new Docker app automates Hyper-V automatically which more easily fits into my workflow, especially if I'm using other Hyper-V features, like the free Visual Studio Android Emulator.

I signed up at http://beta.docker.com. Once installed, when you run the Docker app with Hyper-V enabled Docker automatically creates the Linux "mobylinux" VM you need in Hyper-V, sets it up and starts it up.

"Moby" the Docker VM running in Hyper-V

After Docker for Windows (Beta) is installed, you just run PowerShell or CMD and type "docker" and it's already set up with the right PATH and Environment Variables and just works. It gets setup on your local machine as http://docker but the networking goes through Hyper -V, as it should.

The best part is that Docker for Windows supports "volume mounting" which means the container can see your code on your local device (they have a "wormhole" between the container and the host) which means you can do a "edit and refresh" type scenarios for development. In fact, Docker Tools for Visual Studio uses this feature - there's more details on this "Edit and Refresh "support in Visual Studio here.

The Docker Tools for Visual Studio can be downloaded at http://aka.ms/dockertoolsforvs. It adds a lot of nice integration like this:

Docker in VS

This makes the combination of Docker for Windows + Docker Tools for Visual Studio pretty sweet. As far as the VS Tools for Docker go, support for Windows is coming soon, but for now, here's what Version 0.10 of these tools support with a Linux container:

  • Docker assets for Debug and Release configurations are added to the project
  • A PowerShell script added to the project to coordinate the build and compose of containers, enabling you to extend them while keeping the Visual Studio designer experiences
  • F5 in Debug config, launches the PowerShell script to build and run your docker-compose.debug.yml file, with Volume Mapping configured
  • F5 in Release config launches the PowerShell script to build and run your docker-compose.release.yml file, with an image you can verify and push to your docker registry for deployment to other environment

You can read more about how Docker on Windows works at Steve Lasker's Blog and also watch his video about Visual Studio's support for Docker in his video on Ch9 and again, sign up for Docker Beta at http://beta.docker.com.


Sponsor: Thanks to Seq for sponsoring the feed this week! Need to make sense of complex or distributed apps? Structured logging helps your team cut through that complexity and resolve issues faster. Learn more about structured logging with Serilog and Seq at https://getseq.net.


© 2016 Scott Hanselman. All rights reserved.
     

Thanks For Ruining Another Game Forever, Computers

In 2006, after visiting the Computer History Museum’s exhibit on Chess, I opined:

We may have reached an inflection point. The problem space of chess is so astonishingly large that incremental increases in hardware speed and algorithms are unlikely to result in meaningful gains from here on out.

So. About

In 2006, after visiting the Computer History Museum's exhibit on Chess, I opined:

We may have reached an inflection point. The problem space of chess is so astonishingly large that incremental increases in hardware speed and algorithms are unlikely to result in meaningful gains from here on out.

So. About that. Turns out I was kinda … totally completely wrong. The number of possible moves, or "problem space", of Chess is indeed astonishingly large, estimated to be 1050:

100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

Deep Blue was interesting because it forecast a particular kind of future, a future where specialized hardware enabled brute force attack of the enormous chess problem space, as its purpose built chess hardware outperformed general purpose CPUs of the day by many orders of magnitude. How many orders of magnitude? In the heady days of 1997, Deep Blue could evaluate 200 million chess positions per second. And that was enough to defeat Kasparov, the highest ever ranked human player – until 2014 at least. Even though one of its best moves was the result of a bug.

200,000,000

In 2006, about ten years later, according to the Fritz Chess benchmark, my PC could evaluate only 4.5 million chess positions per second.

4,500,000

Today, about twenty years later, that very same benchmark says my PC can evaluate a mere 17.2 million chess positions per second.

17,200,000

Ten years, four times faster. Not bad! Part of that is I went from dual to quad core, and these chess calculations scale almost linearly with the number of cores. An eight core CPU, no longer particularly exotic, could probably achieve ~28 million on this benchmark today.

28,000,000

I am not sure the scaling is exactly linear, but it's fair to say that even now, twenty years later, a modern 8 core CPU is still about an order of magnitude slower at the brute force task of evaluating chess positions than what Deep Blue's specialized chess hardware achieved in 1997.

But here's the thing: none of that speedy brute forcing matters today. Greatly improved chess programs running on mere handheld devices can perform beyond grandmaster level.

In 2009 a chess engine running on slower hardware, a 528 MHz HTC Touch HD mobile phone running Pocket Fritz 4 reached the grandmaster level – it won a category 6 tournament with a performance rating of 2898. Pocket Fritz 4 searches fewer than 20,000 positions per second. This is in contrast to supercomputers such as Deep Blue that searched 200 million positions per second.

As far as chess goes, despite what I so optimistically thought in 2006, it's been game over for humans for quite a few years now. The best computer chess programs, vastly more efficient than Deep Blue, combined with modern CPUs which are now finally within an order of magnitude of what Deep Blue's specialized chess hardware could deliver, play at levels way beyond what humans can achieve.

Chess: ruined forever. Thanks, computers. You jerks.

Despite this resounding defeat, there was still hope for humans in the game of Go. The number of possible moves, or "problem space", of Go is estimated to be 10170:

1,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

Remember that Chess had a mere fifty zeroes there? Go has more possible moves than there are atoms in the universe.

Wrap your face around that one.

Deep Blue was a statement about the inevitability of eventually being able to brute force your way around a difficult problem with the constant wind of Moore's Law at your back. If Chess is the quintessential European game, Go is the quintessential Asian game. Go requires a completely different strategy. Go means wrestling with a problem that is essentially impossible for computers to solve in any traditional way.

A simple material evaluation for chess works well – each type of piece is given a value, and each player receives a score depending on his/her remaining pieces. The player with the higher score is deemed to be 'winning' at that stage of the game.

However, Chess programmers innocently asking Go players for an evaluation function would be met with disbelief! No such simple evaluation exists. Since there is only a single type of piece, only the number each player has on the board could be used for a simple material heuristic, and there is almost no discernible correlation between the number of stones on the board and what the end result of the game will be.

Analysis of a problem this hard, with brute force completely off the table, is colloquially called "AI", though that term is a bit of a stretch to me. I prefer to think of it as building systems that can learn from experience, aka machine learning. Here's a talk which covers DeepMind learning to play classic Atari 2600 videogames. (Jump to the 10 minute mark to see what I mean.)

As impressive as this is – and it truly is – bear in mind that games as simple as Pac-Man still remain far beyond the grasp of Deep Mind. But what happens when you point a system like that at the game of Go?

DeepMind built a system, AlphaGo, designed to see how far they could get with those approaches in the game of Go. AlphaGo recently played one of the best Go players in the world, Lee Sedol, and defeated him in a stunning 4-1 display. Being the optimist that I am, I guessed that DeepMind would win one or two games, but a near total rout like this? Incredible. In the space of just 20 years, computers went from barely beating the best humans at Chess, with a problem space of 1050, to definitively beating the best humans at Go, with a problem space of 10170. How did this happen?

Well, a few things happened, but one unsung hero in this transformation is the humble video card, or GPU.

Consider this breakdown of the cost of floating point operations over time, measured in dollars per gigaflop:

1961$8,300,000,000
1984$42,780,000
1997$42,000
2000$1,300
2003$100
2007$52
2011$1.80
2012$0.73
2013$0.22
2015$0.08

What's not clear in this table is that after 2007, all the big advances in FLOPS came from gaming video cards designed for high speed real time 3D rendering, and as an incredibly beneficial side effect, they also turn out to be crazily fast at machine learning tasks.

The Google Brain project had just achieved amazing results — it learned to recognize cats and people by watching movies on YouTube. But it required 2,000 CPUs in servers powered and cooled in one of Google’s giant data centers. Few have computers of this scale. Enter NVIDIA and the GPU. Bryan Catanzaro in NVIDIA Research teamed with Andrew Ng’s team at Stanford to use GPUs for deep learning. As it turned out, 12 NVIDIA GPUs could deliver the deep-learning performance of 2,000 CPUs.

Let's consider a related case of highly parallel computation. How much faster is a GPU at password hashing?

Radeon 79708213.6 M c/s
6-core AMD CPU52.9 M c/s

Only 155 times faster right out of the gate. No big deal. On top of that, CPU performance has largely stalled in the last decade. While more and more cores are placed on each die, which is great when the problems are parallelizable – as they definitely are in this case – the actual performance improvement of any individual core over the last 5 to 10 years is rather modest.

But GPUs are still doubling in performance every few years. Consider password hash cracking expressed in the rate of hashes per second:

GTX 295200925k
GTX 690201254k
GTX 780 Ti2013100k
GTX 980 Ti2015240k

The latter video card is the one in my machine right now. It's likely the next major revision from Nvidia, due later this year, will double these rates again.

(While I'm at it, I'd like to emphasize how much it sucks to be an 8 character password in today's world. If your password is only 8 characters, that's perilously close to no password at all. That's also why why your password is (probably) too damn short. In fact, we just raised the minimum allowed password length on Discourse to 10 characters, because annoying password complexity rules are much less effective in reality than simply requiring longer passwords.)

Distributed AlphaGo used 1202 CPUs and 176 GPUs. While that doesn't sound like much, consider that as we've seen, each GPU can be up to 150 times faster at processing these kinds of highly parallel datasets — so those 176 GPUs were the equivalent of adding ~26,400 CPUs to the task. Or more!

Even if you don't care about video games, they happen to have a profound accidental impact on machine learning improvements. Every time you see a new video card release, don't think "slightly nicer looking games" think "wow, hash cracking and AI just got 2× faster … again!"

I'm certainly not making the same mistake I did when looking at Chess in 2006. (And in my defense, I totally did not see the era of GPUs as essential machine learning aids coming, even though I am a gamer.) If AlphaGo was intimidating today, having soundly beaten the best human Go player in the world, it'll be no contest after a few more years of GPUs doubling and redoubling their speeds again.

AlphaGo, broadly speaking, is the culmination of two very important trends in computing:

  1. Huge increases in parallel processing power driven by consumer GPUs and videogames, which started in 2007. So if you're a gamer, congratulations! You're part of the problem-slash-solution.

  2. We're beginning to build sophisticated (and combined) algorithmic approaches for entirely new problem spaces that are far too vast to even begin being solved by brute force methods alone. And these approaches clearly work, insofar as they mastered one of the hardest games in the world, one that many thought humans would never be defeated in.

Great. Another game ruined forever by computers. Jerks.

Based on our experience with Chess, and now Go, we know that computers will continue to beat us at virtually every game we play, in the same way that dolphins will always swim faster than we do. But what if that very same human mind was capable of not only building the dolphin, but continually refining it until they arrived at the world's fastest minnow? Where Deep Blue was the more or less inevitable end result of brute force computation, AlphaGo is the beginning of a whole new era of sophisticated problem solving against far more enormous problems. AlphaGo's victory is not a defeat of the human mind, but its greatest triumph.

(If you'd like to learn more about the powerful intersection of sophisticated machine learning algorithms and your GPU, read this excellent summary of AlphaGo and then download the DeepMind Atari learner and try it yourself.)

[advertisement] Find a better job the Stack Overflow way - what you need when you need it, no spam, and no scams.

Thanks For Ruining Another Game Forever, Computers

In 2006, after visiting the Computer History Museum’s exhibit on Chess, I opined:

We may have reached an inflection point. The problem space of chess is so astonishingly large that incremental increases in hardware speed and algorithms are unlikely to result in meaningful gains from here on out.

So. About

In 2006, after visiting the Computer History Museum's exhibit on Chess, I opined:

We may have reached an inflection point. The problem space of chess is so astonishingly large that incremental increases in hardware speed and algorithms are unlikely to result in meaningful gains from here on out.

So. About that. Turns out I was kinda … totally completely wrong. The number of possible moves, or "problem space", of Chess is indeed astonishingly large, estimated to be 1050:

100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

Deep Blue was interesting because it forecast a particular kind of future, a future where specialized hardware enabled brute force attack of the enormous chess problem space, as its purpose built chess hardware outperformed general purpose CPUs of the day by many orders of magnitude. How many orders of magnitude? In the heady days of 1997, Deep Blue could evaluate 200 million chess positions per second. And that was enough to defeat Kasparov, the highest ever ranked human player – until 2014 at least. Even though one of its best moves was the result of a bug.

200,000,000

In 2006, about ten years later, according to the Fritz Chess benchmark, my PC could evaluate only 4.5 million chess positions per second.

4,500,000

Today, about twenty years later, that very same benchmark says my PC can evaluate a mere 17.2 million chess positions per second.

17,200,000

Ten years, four times faster. Not bad! Part of that is I went from dual to quad core, and these chess calculations scale almost linearly with the number of cores. An eight core CPU, no longer particularly exotic, could probably achieve ~28 million on this benchmark today.

28,000,000

I am not sure the scaling is exactly linear, but it's fair to say that even now, twenty years later, a modern 8 core CPU is still about an order of magnitude slower at the brute force task of evaluating chess positions than what Deep Blue's specialized chess hardware achieved in 1997.

But here's the thing: none of that speedy brute forcing matters today. Greatly improved chess programs running on mere handheld devices can perform beyond grandmaster level.

In 2009 a chess engine running on slower hardware, a 528 MHz HTC Touch HD mobile phone running Pocket Fritz 4 reached the grandmaster level – it won a category 6 tournament with a performance rating of 2898. Pocket Fritz 4 searches fewer than 20,000 positions per second. This is in contrast to supercomputers such as Deep Blue that searched 200 million positions per second.

As far as chess goes, despite what I so optimistically thought in 2006, it's been game over for humans for quite a few years now. The best computer chess programs, vastly more efficient than Deep Blue, combined with modern CPUs which are now finally within an order of magnitude of what Deep Blue's specialized chess hardware could deliver, play at levels way beyond what humans can achieve.

Chess: ruined forever. Thanks, computers. You jerks.

Despite this resounding defeat, there was still hope for humans in the game of Go. The number of possible moves, or "problem space", of Go is estimated to be 10170:

1,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

Remember that Chess had a mere fifty zeroes there? Go has more possible moves than there are atoms in the universe.

Wrap your face around that one.

Deep Blue was a statement about the inevitability of eventually being able to brute force your way around a difficult problem with the constant wind of Moore's Law at your back. If Chess is the quintessential European game, Go is the quintessential Asian game. Go requires a completely different strategy. Go means wrestling with a problem that is essentially impossible for computers to solve in any traditional way.

A simple material evaluation for chess works well – each type of piece is given a value, and each player receives a score depending on his/her remaining pieces. The player with the higher score is deemed to be 'winning' at that stage of the game.

However, Chess programmers innocently asking Go players for an evaluation function would be met with disbelief! No such simple evaluation exists. Since there is only a single type of piece, only the number each player has on the board could be used for a simple material heuristic, and there is almost no discernible correlation between the number of stones on the board and what the end result of the game will be.

Analysis of a problem this hard, with brute force completely off the table, is colloquially called "AI", though that term is a bit of a stretch to me. I prefer to think of it as building systems that can learn from experience, aka machine learning. Here's a talk which covers DeepMind learning to play classic Atari 2600 videogames. (Jump to the 10 minute mark to see what I mean.)

As impressive as this is – and it truly is – bear in mind that games as simple as Pac-Man still remain far beyond the grasp of Deep Mind. But what happens when you point a system like that at the game of Go?

DeepMind built a system, AlphaGo, designed to see how far they could get with those approaches in the game of Go. AlphaGo recently played one of the best Go players in the world, Lee Sedol, and defeated him in a stunning 4-1 display. Being the optimist that I am, I guessed that DeepMind would win one or two games, but a near total rout like this? Incredible. In the space of just 20 years, computers went from barely beating the best humans at Chess, with a problem space of 1050, to definitively beating the best humans at Go, with a problem space of 10170. How did this happen?

Well, a few things happened, but one unsung hero in this transformation is the humble video card, or GPU.

Consider this breakdown of the cost of floating point operations over time, measured in dollars per gigaflop:

1961$8,300,000,000
1984$42,780,000
1997$42,000
2000$1,300
2003$100
2007$52
2011$1.80
2012$0.73
2013$0.22
2015$0.08

What's not clear in this table is that after 2007, all the big advances in FLOPS came from gaming video cards designed for high speed real time 3D rendering, and as an incredibly beneficial side effect, they also turn out to be crazily fast at machine learning tasks.

The Google Brain project had just achieved amazing results — it learned to recognize cats and people by watching movies on YouTube. But it required 2,000 CPUs in servers powered and cooled in one of Google’s giant data centers. Few have computers of this scale. Enter NVIDIA and the GPU. Bryan Catanzaro in NVIDIA Research teamed with Andrew Ng’s team at Stanford to use GPUs for deep learning. As it turned out, 12 NVIDIA GPUs could deliver the deep-learning performance of 2,000 CPUs.

Let's consider a related case of highly parallel computation. How much faster is a GPU at password hashing?

Radeon 79708213.6 M c/s
6-core AMD CPU52.9 M c/s

Only 155 times faster right out of the gate. No big deal. On top of that, CPU performance has largely stalled in the last decade. While more and more cores are placed on each die, which is great when the problems are parallelizable – as they definitely are in this case – the actual performance improvement of any individual core over the last 5 to 10 years is rather modest.

But GPUs are still doubling in performance every few years. Consider password hash cracking expressed in the rate of hashes per second:

GTX 295200925k
GTX 690201254k
GTX 780 Ti2013100k
GTX 980 Ti2015240k

The latter video card is the one in my machine right now. It's likely the next major revision from Nvidia, due later this year, will double these rates again.

(While I'm at it, I'd like to emphasize how much it sucks to be an 8 character password in today's world. If your password is only 8 characters, that's perilously close to no password at all. That's also why why your password is (probably) too damn short. In fact, we just raised the minimum allowed password length on Discourse to 10 characters, because annoying password complexity rules are much less effective in reality than simply requiring longer passwords.)

Distributed AlphaGo used 1202 CPUs and 176 GPUs. While that doesn't sound like much, consider that as we've seen, each GPU can be up to 150 times faster at processing these kinds of highly parallel datasets — so those 176 GPUs were the equivalent of adding ~26,400 CPUs to the task. Or more!

Even if you don't care about video games, they happen to have a profound accidental impact on machine learning improvements. Every time you see a new video card release, don't think "slightly nicer looking games" think "wow, hash cracking and AI just got 2× faster … again!"

I'm certainly not making the same mistake I did when looking at Chess in 2006. (And in my defense, I totally did not see the era of GPUs as essential machine learning aids coming, even though I am a gamer.) If AlphaGo was intimidating today, having soundly beaten the best human Go player in the world, it'll be no contest after a few more years of GPUs doubling and redoubling their speeds again.

AlphaGo, broadly speaking, is the culmination of two very important trends in computing:

  1. Huge increases in parallel processing power driven by consumer GPUs and videogames, which started in 2007. So if you're a gamer, congratulations! You're part of the problem-slash-solution.

  2. We're beginning to build sophisticated (and combined) algorithmic approaches for entirely new problem spaces that are far too vast to even begin being solved by brute force methods alone. And these approaches clearly work, insofar as they mastered one of the hardest games in the world, one that many thought humans would never be defeated in.

Great. Another game ruined forever by computers. Jerks.

Based on our experience with Chess, and now Go, we know that computers will continue to beat us at virtually every game we play, in the same way that dolphins will always swim faster than we do. But what if that very same human mind was capable of not only building the dolphin, but continually refining it until they arrived at the world's fastest minnow? Where Deep Blue was the more or less inevitable end result of brute force computation, AlphaGo is the beginning of a whole new era of sophisticated problem solving against far more enormous problems. AlphaGo's victory is not a defeat of the human mind, but its greatest triumph.

(If you'd like to learn more about the powerful intersection of sophisticated machine learning algorithms and your GPU, read this excellent summary of AlphaGo and then download the DeepMind Atari learner and try it yourself.)

[advertisement] Find a better job the Stack Overflow way - what you need when you need it, no spam, and no scams.

How to Fix “Upload: Failed to Write File to Disk” Error in WordPress

Are you seeing ‘Upload: Failed to write file to disk’ error when uploading files in WordPress? This common error can be very frustrating for beginner users. In this article, we will show you how to fix “Upload: failed to write file to disk” error in… Read More »

The post How to Fix “Upload: Failed to Write File to Disk” Error in WordPress appeared first on WPBeginner.

Are you seeing ‘Upload: Failed to write file to disk’ error when uploading files in WordPress? This common error can be very frustrating for beginner users. In this article, we will show you how to fix “Upload: failed to write file to disk” error in WordPress.

Upload failed to write file to disk error in WordPress

What Causes Failed To Write File To Disk Error in WordPress?

This error can occur due to a number of reasons. However, the most common one is incorrect folder permissions.

Each file and folder on your website has a set of permissions. Your web server controls access to the files based on these permissions.

Incorrect permissions to a folder can take away your ability to write files on server. This means your web server cannot create or add new files to that particular folder.

If you try to upload images or any other files from WordPress admin area, you will get one of the following error messages:

  • WordPress failed to write to disk
  • WordPress has failed to upload due to an error failed to write file to disk
  • Unable to create directory wp-content/uploads/2016/03. Is its parent directory writable by the server?

Fix Upload Failed to Write to Disk Error in WordPress

First, you need to connect to your WordPress site using a FTP client.

For this tutorial, we are using the free FileZilla FTP client. If you are using some other FTP client, then it might look a little different.

Once you are connected, you need to right click on the wp-content folder and select file permissions.

FTP file permissions

This will bring up file permissions dialog box in your FTP client. It will show you file permissions for owner, group, and public.

Changing file permissions for wp-content folder

You need to enter 755 in the numeric value field.

After that, you need to check the box next to ‘Recurse into subdirectories’.

Lastly, you need to click on ‘Apply to directories only’ option.

Click on the OK button to continue.

Your FTP client will now set folder permissions to 755 and apply it to all sub-folders inside wp-content. This includes uploads folder where all your images are stored.

You also want to make sure that file permissions for individual files in your wp-content folder are correct.

Once again, right click on wp-content folder and select file permissions. This time we will change permissions for files.

Enter 644 in the numeric value and then check the box next to ‘Recurse into subdirectories’.

Lastly, you need to click on ‘Apply to files only’ option.

Click on the OK button to continue. Your FTP client will now set file permissions to 644 for all files in wp-content folder.

You can now visit your WordPress site and try uploading files.

If you still see the error, then you will need to contact your WordPress hosting provider and ask them to empty the temporary files directory.

WordPress uploads your images using PHP which first saves the uploads to a temporary directory on your web server. After that it moves them to your WordPress uploads folder.

If this temporary directory is full or is poorly configured, then WordPress will not be able to write the file to disk.

This temporary folder is located on your server and in most cases you cannot access it using FTP. You will need to contact your web host and ask them to empty it for you.

We hope this article helped you resolve ‘Upload: Failed to Write File to Disk’ Error in WordPress. You may also want to see our guide on how to fix common image issues in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Fix “Upload: Failed to Write File to Disk” Error in WordPress appeared first on WPBeginner.

How to Create an Autoblog in WordPress

Recently, one of our users asked how they can create an autoblog in WordPress. An autoblog is an automated WordPress site that pulls content from other sources and publishes them. In this article, we will show you how to create an autoblog in WordPress. What… Read More »

The post How to Create an Autoblog in WordPress appeared first on WPBeginner.

Recently, one of our users asked how they can create an autoblog in WordPress. An autoblog is an automated WordPress site that pulls content from other sources and publishes them. In this article, we will show you how to create an autoblog in WordPress.

Creating Autoblog in WordPress

What is an Autoblog in WordPress?

Autoblog or an automated blog is a website that automatically pulls content from other websites using RSS feeds.

Mainly the term is associated with content-scrapers and spam blogs. However, there are many perfectly good and profitable usage scenarios for autoblogging tools.

For example, an autoblog can be used to create a curated website that gathers news on specific topics and then presents them under one roof. An autoblog can also be used on company intranets and private websites.

Having said that, let’s take a look at how to create an autoblog in WordPress.

Creating an Autoblog in WordPress

First thing you need to do is install and activate WP RSS Aggregator plugin. For more details, see our step by step guide on how to install a WordPress plugin.

The basic plugin is free, but for this tutorial you will need paid addons in the Advanced Feeds Bundle.

The pricing starts from $139 for a single site license with one year of support and updates.

Once you have installed and activated all the addons, simply visit RSS Aggregator » Add New to add a new feed source.

Adding a feed source

First you need to provide this feed source a title, and then provide the RSS feed URL.

Next you need to scroll down a little to the ‘Feed to Post’ section. Here you need to select a post type for imported feed items.

Feed to post

By default, the plugin will import posts as draft. If you want, then you can change that to published.

Don’t forget to check the box next to ‘Force full content’ option. Using this option, will allow WP RSS Aggregator to fetch full text of posts.

Next, you need to set up ‘Feed to post – images’ section. This is where you set up how your autoblog will handle images.

Feed to post images

It can automatically import images from feed sources and store them in your WordPress media library. It can also fetch the first image in the content and use it as featured image. You need to set up these options to match your own needs.

The add new feed source page has many other options. You can review them and adjust them to meet your own needs.

You can use keyword filtering to import or exclude content matching certain keywords or tags. You can also add custom content before or after the source article.

Click on the Publish Feed button when you are done.

You can now visit your posts section, and you will see feed items imported into your WordPress site.

Repeat the process to add more feed sources if you need. You can check the status of your feeds by visiting RSS Aggregator » Feed Sources.

Autoblog feeds

Quickly Adding Multiple Feed Sources For Your Autoblog

Adding each feed source, and configuring them one by one can be a tedious task. Here is how you can quickly add multiple feeds at once using the same settings.

Go to RSS Aggregator » Settings and click on Feed to Post tab. Here you can configure the default settings for the feed to post addon.

These settings will be applied to all the feed sources that you add in the next step.

Feed to post settings

Next, you need to visit RSS Aggregator » Import & Export. Under the import box, you need to add name and url of your feed sources.

Separate name and feed URL with a comma and a space. Add one feed source per line.

Bulk importing content from multiple feeds

After that click on bulk import button to quickly add all the feed sources to your WordPress autoblog.

That’s all, we hope this article helped you create an Autoblog in WordPress.

Editor’s Note: Word of Warning

If you’re creating an autoblog that’s public, please do not scrape full content or images because you will be subject to copyright infringement.

The best use of an autoblog is either when it’s used inside a company intranet. If you’re creating a curated news site, then pull in summaries and link to original source for full article.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Create an Autoblog in WordPress appeared first on WPBeginner.