You can use the “header” function to do the needed, as simple as below:
header('Location: https://wikiezay.com', true, 301);
Or using Meta refresh redirection:
<meta http-equiv="refresh" content="0;url=https://wikiezay.com">
Anyway, it’s up to you to use which method that serves your needs, so if you used the PHP method, that means you are using it within your models or functions, or it is within a complicated logic that trigger such action, like logout cases.
While using the meta refresh method, it will save the hassle as simple as putting one line in a page that is already moved to another one.
Since you are using the redirection in your pages, old or new ones, so that means that you are affecting this page position in search engines, so be careful to consider if this page is important then it’s better to use the PHP or .htaccess redirect with 301 to let search engines bots know that your page is moved not removed.
Another point to consider as well is, dealing with google search console to change this url as well quickly and easily to make sure you are not affected, specially if you are dealing with high-ranked pages on search engine results.