JAKARTA—Indonesia will temporarily bar new palm oil and mining operations to help protect the country’s vast tropical forests following international criticism over its environmental stewardship.

A spokesman for Indonesian President Joko Widodo said on Friday that the ban would likely take effect this year and last for an undetermined time.

The...