What should index.php contain on Synology NAS to get external access to WordPress to work?

please note: WP from Synology NAS uses MariaDB/MySQL to store & organize its content, thus you need to set up a user account(e.g. WP_User) in the database(by using e.g. phpMySQLAdmin) to give ‘read’ privilege from anywhere (.),

Secondly, please pay attention to MariaDB is using the port of 3307(not MySQL 3306) as default, if you are to align this with NAS firewall.

please check this for details:
https://community.synology.com/enu/forum/17/post/55736?page=5&sort=oldest