If you need to stay for longer than 90 days, you do not qualify for the Visa Waiver Program using the Electronic System for Travel Authorization (ESTA).
Instead, you can apply for a visitor B visa. The requirements for the B visa are similar to the Visa Waiver program. You can travel for many business and tourism purposes, but certain types of travel are not permitted, including: study for credit; employment; work as foreign press, radio, film, journalists, or other information media; and permanent residence.
Additionally, the State Department has implemented a new rule to expand their ability to determine that a foreign national has misrepresented their intentions when coming to the United States.
This new rule essentially states that if the foreign national does anything inconsistent with their visa status within 90 days of their entry, such as work without authorization, get married to a US citizen, enroll in school, or change status, a finding of misrepresentation can be made.
This can result in a permanent ground of inadmissibility. It is now more important than ever to fully comply with the terms of your visa status, especially during the first 90 days of entry into the United States.