Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 20480 bytes)

I have made wordpress pages on divi builder on m localhost and they were working fine without any problem but when i installed divi on my online website its giving me the error Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 20480 bytes) I tried changing the define( ‘WP_MEMORY_LIMIT’, ’40M’ );…