# Install old WordPress version

**URL:** <https://community.localwp.com/t/install-old-wordpress-version/6982>\
**Category:** WordPress Questions\
**Created:** [June 21, 2018, 6:54pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982 "2018-06-21T18:54:41Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gio](https://avatars.discourse-cdn.com/v4/letter/g/9dc877/32.png) [@Gio](https://community.localwp.com/u/Gio)\
**Post date:** [June 21, 2018, 6:54pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/1 "2018-06-21T18:54:41Z")

</div>

Hello,

I’m trying to install an old version of WordPress, the 4.8 to be clear, but I haven’t have luck so far. I ran into this [WP Nostalgia repository](https://github.com/keesiemeijer/wp-local-version), but I rather ask about it before moving forward with installing unknown script files. Is this the right solution for my problem or is there a better ‘more official’ solution I can use?

Thanks!

---

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [June 21, 2018, 7:54pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/2 "2018-06-21T19:54:25Z")

</div>

Hi Gio,

This may not be the _best_ way to do it, but this is what I’d do:

1. Create a new site in Local
2. Go to Database » Adminer in Local and remove/drop all of the tables in the `local` database

 ![Drop%20Tables](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/1/1ce10bde42025c8a8774a7b44632049b15a8303a.png)

1. Browse to the site’s `app/public` folder and delete all of the files except for `wp-config.php`

 ![43%20PM](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/c/ca97d4268dfaa6752444c898eec74e6ced07154b.png)

1. Download the desired release of WordPress here: [Release Archive – WordPress.org](https://wordpress.org/download/release-archive/)
2. Extract the downloaded WordPress archive into the site’s `app/public` folder along side the `wp-config.php` that you kept

 ![Move%20Files](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/c/c8d34f3faaa0d98508539c4082dadd1d11f1e61b.png)

1. Navigate to the site in your browser and you should be prompted to go through the WordPress install process

 ![11%20PM](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/e/e2f0a2d0dad2060cc66f063794abb852f850d4cc.png)

1. Go through the WordPress install process
2. Done!

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/daniel/32/4605_2.png) [@daniel](https://community.localwp.com/u/daniel)\
**Post date:** [July 9, 2018, 5:12pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/3 "2018-07-09T17:12:47Z")

</div>

That is an interesting script if you frequently need to create a lot sites for testing (though I doubt it will work on Windows without a lot of GNU and some typical paths created).

@clay’s method is what I do and would recommend as well. It’s fairly easy and risk-free. The script that you linked seems like it would be more appropriate for some serious QA testing.

---

<div class="post-metadata">

**Author:** ![cbent](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@cbent](https://community.localwp.com/u/cbent)\
**Post date:** [July 19, 2020, 1:20pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/4 "2020-07-19T13:20:45Z")

</div>

Thank you so much. This solution works for me.

---

<div class="post-metadata">

**Author:** ![ErmLocal](https://avatars.discourse-cdn.com/v4/letter/e/43a26b/32.png) [@ErmLocal](https://community.localwp.com/u/ErmLocal)\
**Post date:** [April 28, 2021, 2:21am UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/5 "2021-04-28T02:21:55Z")

</div>

I saw this answer on another post. To downgrade the wp version with wp cli.

wp core update --version=4.9.8 --force

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [April 28, 2021, 3:44am UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/6 "2021-04-28T03:44:57Z")

</div>

Can use the [Core Rollback](https://wordpress.org/plugins/core-rollback/) plugin if you don’t have wp-cli access or not sure which version number to use.

---

<div class="post-metadata">

**Author:** ![Alderete](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/alderete/32/13701_2.png) [@Alderete](https://community.localwp.com/u/Alderete)\
**Post date:** [June 28, 2021, 2:46am UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/7 "2021-06-28T02:46:29Z")

</div>

I think there are probably limits to how far backwards you can force a downgrade. At least, after starting with a new Local site (with WordPress 5.7) I immediately tried to downgrade to WordPress 4.2 with `wp core update --version=4.2.30 --force`

The command succeeded, but accessing the site gives me a fatal PHP error. Seems to be caused by the default theme, which remains 2021. I’m sure I could work around this, but then I’d probably just run into other things that the downgrade process doesn’t handle correctly.

Safest method, at least if you want to cross major release boundaries, seems like the manual process described by @clay.

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [June 28, 2021, 3:33pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/8 "2021-06-28T15:33:26Z")

</div>

It seems that you would need to choose an older default theme, like TwentyTen or TwentyTwelve to ensure compatibility.

---

<div class="post-metadata">

**Author:** ![Alderete](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/alderete/32/13701_2.png) [@Alderete](https://community.localwp.com/u/Alderete)\
**Post date:** [June 28, 2021, 5:40pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/9 "2021-06-28T17:40:02Z")

</div>

That would indeed solve the very first problem I ran into with downgrading so far back into the past.

My concern is that, if it’s not one thing, it’s another. What _else_ does the CLI not take into account when downgrading? The theme issue surfaced immediately. Would the next thing be so obvious, or would I only find it after I’ve put other work into my task? How _many_ things will I run into?

Migrating backwards, especially across major releases, is almost certainly a less tested path. And the manual installation process outlined by @clay takes only 2-3 minutes longer than using the CLI, while offering confidence that it’s done perfectly. So why _not_ do it manually?

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [June 28, 2021, 5:54pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/10 "2021-06-28T17:54:22Z")

</div>

FWIW I use the Core Rollback plugin referenced above and the TwentyTwenty theme. I use this regularly for testing new core releases, betas, and RC releases.

I regularly test down to WP 4.0.33 this way.

It is effortless.

---

<div class="post-metadata">

**Author:** ![PaulSwarthout](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@PaulSwarthout](https://community.localwp.com/u/PaulSwarthout)\
**Post date:** [June 28, 2021, 10:06pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/11 "2021-06-28T22:06:04Z")

</div>

This is the process that I use, as well. But lately, there seems to be a problem that can be seriously annoying. The latest versions of WordPress want to automatically update core, by default. I don’t know how many times I’ve used @Clay’s method only to relaunch the website after the older version install and found the latest version has been reinstalled. It’s not enough to remove all traces of the current version (files and database). It’s also important to tell WordPress to NOT automatically update its core files.

Add the WP\_AUTO\_UPDATE\_CORE define to your wp-config.php file before starting the downgrade, or at the end of the installation of the old version, WordPress will update it to the latest version.

Specifically, add the following line to wp-config.php.

`define( 'WP_AUTO_UPDATE_CORE', false );`

---

<div class="post-metadata">

**Author:** ![jlanpheer](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@jlanpheer](https://community.localwp.com/u/jlanpheer)\
**Post date:** [July 11, 2021, 10:04pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/12 "2021-07-11T22:04:07Z")

</div>

The feedback on this seems really good, but it didn’t work for me. I have a client who is currently running WP 5.3.8 on their site and i’m making some improvements for them. I’d like to create their exact environment by installing this older version of WP. I followed the instructions here (including the note from Paul to avoid the automatic update of the core) and when i try to open the site, i get a ‘403 Forbidden’ error.

The nginx error log shows the following:  
[error] 15403#0: \*1 directory index of “/Users/Me/Local Sites/xxx538/app/public/” is forbidden, client: 127.0.0.1, server: , request: “GET / HTTP/1.0”, host: “xxx538.local”

Everything that i’ve read tells me that this is a file permissions error. I have changed the file permissions on the folder listed above to “The world can read/write”, saved that, bounced the application and still the same error.

Can anyone offer any advice?  
thank you!

---

<div class="post-metadata">

**Author:** ![Mattia541993](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Mattia541993](https://community.localwp.com/u/Mattia541993)\
**Post date:** [October 7, 2021, 1:52pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/13 "2021-10-07T13:52:48Z")

</div>

I used WPDowngrade plugin ([WP Downgrade | Specific Core Version – Plugin WordPress | WordPress.org Italia](https://it.wordpress.org/plugins/wp-downgrade/)) from the dashboard of a running newer WP version

---

<div class="post-metadata">

**Author:** ![tresorama](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@tresorama](https://community.localwp.com/u/tresorama)\
**Post date:** [February 4, 2023, 5:51am UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/14 "2023-02-04T05:51:50Z")

</div>

I need to launch a WP 4.9.22 site.  
I used this solution and PHP shown a fatal error about the `wp_options` table not existing…

So i tried the same process but without leaving the `app/public/wp-config.php` there, instead i moved it to desktop so be able to read its content later on.  
Then navigating to `....local/wp-admin` should ask you to setup wp and inject database connection params, use values stored in `desktop/wp-config.php`.

If this doesn’t work try also with PHP 5 and MySQL 5, instead of PHP 8 and MySQL 8 ,while creating the Local site.  
I done multiple trial and error so i don’t remember exactly order of things.

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [February 4, 2023, 2:42pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/15 "2023-02-04T14:42:51Z")

</div>

Hi @tresorama

What is your OS version and Local version?

Can you share your Local Log? [Retrieving Local’s Log File](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/#download-local-logs)

---

<div class="post-metadata">

**Author:** ![tresorama](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@tresorama](https://community.localwp.com/u/tresorama)\
**Post date:** [February 4, 2023, 3:17pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/16 "2023-02-04T15:17:18Z")

</div>

I forgot to say clearly that i succeded. 😀

My OS: MacOS BigSur 11.7.3  
Local: 6.6.1+6281

My final working solution has this environment:

- PHP: 5.6.39
- Server: Apache 2.4.43
- MySQL: 5.7.28

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [February 4, 2023, 3:18pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/17 "2023-02-04T15:18:17Z")

</div>

Glad to hear it! Thanks for providing an update 🙂

---

<div class="post-metadata">

**Author:** ![brsastre](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@brsastre](https://community.localwp.com/u/brsastre)\
**Post date:** [August 20, 2023, 10:02pm UTC](https://community.localwp.com/t/install-old-wordpress-version/6982/18 "2023-08-20T22:02:59Z")

</div>

This worked, thanks clay!
