Make sure plug.vim file is located in ~/.vim/autoload directory.
You are not supposed to copy/paste the whole example to your .vimrc. It's just some examples to show the syntax of vim-plug.
Does :call plug#begin('~/.vim/plugged') give you an error?
# Credit to: https://github.com/junegunn