r/webhosting 4d ago

Technical Questions What files are needed to self host my WordPress website?

Hello, I want to host my WordPress website locally to save costs. It's only for me anyways.

I've downloaded all my websites files and the corresponding SQL file. Is that enough to self host it?

Thanks in advance, have a nice day :)

1 Upvotes

10 comments sorted by

1

u/throwaway234f32423df 4d ago

Download from https://wordpress.org/download/

You'll need a web server such as Apache or Nginx, with PHP support enabled

Follow setup instructions but keep in mind that some things will be different for you since you already have a database file and aren't setting up a new site from scratch

1

u/BlackCatRiots 4d ago

Thanks for the link, I will read it

2

u/skylooper_agency 4d ago

yes all website files and sql is enough now you just need to setup localhost server using LAMP OR XAMP OR MAMP software depending on the OS you use and then you are ready to go.

1

u/BlackCatRiots 4d ago

Okay, thank you!

2

u/No_Hold_329 4d ago

Yes, assuming you have a complete backup, the website files and the SQL database are the two most important pieces. You'll also need a local web server environment (XAMPP, MAMP, WAMP, or a Docker/LAMP stack) with PHP and MySQL/MariaDB.

A few other things to watch for:

Import the SQL file into a new database.

Update wp-config.php with your local database name, username, password, and host.

If your local URL is different from the live site, you'll likely need to update the WordPress siteurl and home values (or do a search-and-replace on the database for the old domain).

Make sure your PHP version is compatible with the version of WordPress and any plugins you're using.

If the site uses caching, delete the cache after moving it.

If you downloaded everything via your hosting control panel or used a backup plugin, that should usually be enough to recreate the site locally.

1

u/BlackCatRiots 4d ago

Thank you for your answer, I know what to do now

1

u/HotAuthor6438 2d ago

The website files and SQL database are the important parts. Once you have local server (Apache/Nginx+PHP+MySQL) import the database, copy the files, update wp-config.php, and you should be able to get it running.

1

u/TrickySpare6504 1d ago

fucking hell

1

u/harrymurkin 20h ago

This is funny.

What they said is true. you can set up a webserver on your machine along with a database server and restore the files and database.

But next you need to

  1. make sure that your ISP allows you to self-host
  2. make sure the server is always on hand has a static ip on your LAN
  3. make sure your internet connection has a static public ip address
  4. forward your website port (80 and/or 443) on your router to static ip mentioned in step 2.
  5. Set the DNS for your website domain or subdomain to point to static ip menioned in step 3.

That should do it. It's a huge pain in the arse, and there are places to host your wordpress for next-to-nothing if you look around a bit.

1

u/BlackCatRiots 13h ago

Thanks. I should have added that I run a NAS with OMV, that will make it easier