Framework is a development platform which generally contains tools, libraries and architectures etc. So you can't say Wordpress is a development platform. Wordpress is just a CMS, nothing more.
> The problem is to always tell beginners (or let them think this is a good idea) to start with a framework / cms because “you shouldn’t reinvent the wheel”.
Learning a CMS and Framework are not same. Learning CMS is user stuff, but learning a framework is a developer stuff.
> When they should use a framework:
> When they need security features (login, session management, etc.). It’s often a bad idea for beginners (and even experts) to write code related to those areas and use it in a live application. But you still should know the language basics.
You can't provide security by learning a language basics. You should read books, articles about web security (independent to the language)
> 1. Customization can be difficult in complex code.
> Take for instance Liferay. Liferay is a big web development platform. If you want to start a membership site...
Your example is not a framework.
> 2. Debugging is usually more difficult when using frameworks.
> Frameworks are good at throwing unreadable meaningless errors.
Are you sure you have used a framework before ?
tl;dr Framework and CMS (or portal) are not same stuff.