That’s pretty much wrong. You are checking the condition on a value that you have not yet initialized, thus never get into the if block at all.
Make this
<p>
<?php if ( ! empty( $website ) ) {$website = get_post_meta($post->ID, ‘website’, true);?>
Website: “><?php echo preg_replace(‘|https?://|’, ”, $website ); ?>
<?php $site = preg_replace(‘{/$}’, ”, $website);} ?></p>
into this
a) populate and check the value in one composite php expression
<p>
<?php if(!empty(($website = get_post_meta($post->ID, ‘website’, true)))) {?>
Website: “><?php echo preg_replace(‘|https?://|’, ”, $website ); ?>
<?php $site = preg_replace(‘{/$}’, ”, $website);} ?></p>
or more cleanly and easy to read by a human
b)
<p>
<?php
$website = get_post_meta($post->ID, ‘website’, true);
if(!empty($website)){?>
Website: “><?php echo preg_replace(‘|https?://|’, ”, $website ); ?>
<?php $site = preg_replace(‘{/$}’, ”, $website);} ?></p>