How to Turn an Old Project Web Page into a Static Web
Story of Old Research Project Websites
Many academic and research projects create websites during their active phase. These sites serve as information hubs, showcasing research findings, datasets, publications, and related activities. However, once the project concludes, there is no further interest to update and maintain those websites as the project itself is not operating. Sometimes the site is quite meaningless but sometimes it is required to keep it alive for extended periods.
Reasons why these sites remain online but do not get updated:
- Legacy Reference: The research might still be used, searched and even cited, and people need access to the original materials.
- Institutional Policies: Some funding agencies or institutions require project sites to remain online for transparency.
- No Maintenance Resources: Keeping a full web site (e.g Wordpress) running requires updates, security patches, and hosting maintenance—none of which make sense for a dormant project.
- Risk of Breakage: Running an outdated CMS (like an old WordPress installation) poses security risks and can break when web and server components (e.g. PHP versions) change.
A possible is converting the site into static HTML. This keeps the content accessible while eliminating the need for active maintenance or security updates.
Converting a WordPress Site to Static HTML
There are several ways to convert a WordPress site into a static version:
WordPress Plugins (Easy but Limited)
If your WordPress site is still operational, you can use a plugin like:
- Simply Static (Free & recommended)
- WP2Static (More advanced but requires configuration)
These plugins generate a static version of your site, which you can then upload to your hosting provider. However, if you have already moved away from WordPress or cannot access the admin panel, a better approach is to mirror the site and copy hard files to the web server as a static web page.
Using Wget to Convert a WordPress Site to Static HTML
wget
is a command-line tool that can crawl and download entire websites, preserving structure and links.
Step-by-Step Guide to Using Wget for Static Site Conversion
1. Install Wget
Most Linux and macOS systems come with wget
pre-installed. You can check by running:
wget --version
If it’s not installed, you can install it using:
- Ubuntu/Debian:
sudo apt install wget
- macOS (Homebrew):
brew install wget
- Windows: Install via GnuWin or use WSL.
2. Download the Entire Website
Navigate to an empty directory and run:
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://yourwebsite.com/
Explanation of Flags:
--mirror
→ Enables recursive download and preserves timestamps.--convert-links
→ Fixes links to work in the local copy.--adjust-extension
→ Ensures.html
extensions are added where necessary.--page-requisites
→ Downloads images, CSS, JavaScript files.--no-parent
→ Prevents downloading unrelated pages from the parent directory.
3. Verify the Downloaded Files
Once the command finishes, navigate into the directory and check the downloaded site structure:
cd yourwebsite.com
ls -l
Open the site in a browser by opening the local index.html
file.
4. Upload the Static Files to Your Server
Now that you have a local copy of your website, you need to upload it to your web server.
Option 1: Using cPanel File Manager
- Log in to cPanel.
- Go to File Manager and navigate to
public_html
. - Delete or move the existing WordPress files.
- Upload the static files from
wget
.
Option 2: Using SCP or FTP
If you have SSH access, you can use scp
:
scp -r yourwebsite.com/* user@yourserver:/var/www/html/
For FTP, use FileZilla or any FTP client to upload the files.
5. Test the Static Website
- Open your website in a browser and check that all links, images, and downloads work correctly.
- If some links are broken, check
wget
logs or manually fix paths in the HTML files.
Final Thoughts
Converting an old project website into a static version is a good way to preserve it without worrying about maintenance, security risks, or software updates. Using wget
is a simple and effective way to achieve this when the WordPress site is no longer actively managed.
Last but not least, with new static HTML version, the site will load faster, be more secure, and require zero upkeep. 🚀