---
title: 'Uh Oh, Mautic upgrade was not successful'
url: 'https://johnlinhart.com/blog/uh-oh-mautic-upgrade-was-not-successful'
markdown: 'https://johnlinhart.com/blog/uh-oh-mautic-upgrade-was-not-successful.md'
date: '2015-09-19'
description: 'UPDATE: This tutorial was copied... ...to the official Mautic documentation: mautic.org/docs/en/tips/update-failed.html Mautic dev team tests Mautic on different Mautic configuration and server settings, but sometimes, something causes an error. That is very unpleasant especially when upgrading Mau…'
taxonomy:
  tag:
    - mautic
    - marketing
  archives_month:
    - sep_2015
  archives_year:
    - '2015'
---

# Uh Oh, Mautic upgrade was not successful

[ Blog ](https://johnlinhart.com/)      Uh Oh, Mautic upgrade was not successful    

   19 *Sep*   
#### [Uh Oh, Mautic upgrade was not successful](https://johnlinhart.com/blog/uh-oh-mautic-upgrade-was-not-successful)

  [mautic](https://johnlinhart.com/tag:mautic) [marketing](https://johnlinhart.com/tag:marketing)  ![](https://johnlinhart.com/images/b/a/9/8/5/ba98554952bad5c79631facf6a7288e980bc53a8-mautibot-uhohoh.png) 

### UPDATE: This tutorial was copied...

...to the official Mautic documentation: [mautic.org/docs/en/tips/update-failed.html](https://mautic.org/docs/en/tips/update-failed.html "This link will take you to an external web site. We are not responsible for their content.")

Mautic dev team tests Mautic on different Mautic configuration and server settings, but sometimes, something causes an error. That is very unpleasant especially when upgrading Mautic to latest version, because it can cause Mautic to be in between of 2 versions and in many cases, that can make Mautic unusable. Here is a list of processes you can try to finish the upgrade manually.

The easiest is to look at `[your-mautic-url]/s/update/schema` to see in what state your database is and to see if it applies the schema update. If it doesn't help or if Mautic is down completely, follow the next tips.

The process depends quite a lot if you have SSH access to the server where Mautic runs or not. Skip to the part "[I don't have SSH access](#i-dont-have-ssh-access)" if you don't.

## I have SSH access

Good for you. That'll make things easier. Log in via command line and go to the directory where Mautic is installed. If you don't know how, search for a tutorial or contact the web/server hosting company to guide you.

Let's take it from the easiest fix to hardest.

### 1. Try to clear cache

When the upgrade failed in the last step, it's possible that only the cache is outdated. Try to clear it manually.

```
php app/console cache:clear
```

If this command throws a PHP error, you can try to nuke the cache folder like this:

```
rm -rf app/cache
```

If clearing cache didn't help, continue with next step.

### 2. Trigger update manually

Firstly, let's find out if there is some version to update to.

```
php app/console mautic:update:find
```

Output of this command should tell you clearly if there is a new version waiting to update to. If so, run:

```
php app/console mautic:update:apply
```

If there is no update to run, try next step.

### 3. Try to run database migrations

Let's check if there are any migrations to run.

```
php app/console doctrine:migration:status
```

If there are any, be sure you have **backup** of your database and then run:

```
php app/console doctrine:migration:migrate
```

### 4. See what changes between the entities (PHP code) and your database schema is

If the upgrade failed in the step of database update, this could solve it. Let's check if the database schema is up to date.

```
php app/console doctrine:schema:update --dump-sql
```

This will write all SQL queries that represent changes between the PHP entities and database schema. Do not execute them without understanding what they do. Especially if your database schema was created on Mautic 2 and your code base is on Mautic 3+. Upgrading database schema this way will not work as ID columns were changed from INT SIGNED to BIGINT UNSIGNED and all the foreign keys will not let the types to change.

### 5. Try to update files manually

There is no command for this. You'll have to:

1. Backup (download) all Mautic files from your server to your local. You can use FTP or much faster [scp command](http://manpages.ubuntu.com/manpages/precise/en/man1/scp.1.html "This link will take you to an external web site. We are not responsible for their content.").
2. Delete all Mautic files and folders. Use FTP or much faster [rm command](http://manpages.ubuntu.com/manpages/precise/en/man1/rm.1.html "This link will take you to an external web site. We are not responsible for their content.")
3. Download latest Mautic package from https://www.mautic.org/download/.
4. Upload the zip package to the server, to the mautic folder. You can use FTP or much faster [scp command](http://manpages.ubuntu.com/manpages/precise/en/man1/scp.1.html "This link will take you to an external web site. We are not responsible for their content.").
5. Unzip the package with `unzip 1.2.0.zip` (change the zip file name). You can remove the zip file after (`rm 1.2.0.zip`).
6. Upload app/config/local.php file from the backup on your local to the fresh Mautic on the server. (Mautic should run now)
7. Upload your custom data if you have some. Custom files can be in folders: media/files, plugins, themes, translations.

## I don't have SSH access

There is a PHP script which can do almost all steps from the section above. You can find it at

[https://gist.github.com/escopecz/9a1a0b10861941a457f4](https://gist.github.com/escopecz/9a1a0b10861941a457f4 "This link will take you to an external web site. We are not responsible for their content.")

The description about how to make it work and use it is below the script. There are some details you'll have to do differently. For example you'll have to use FTP to download and upload files. You'll have to unzip on your local computer and upload unzipped files which will take a lot longer.

## There is PHP error when I execute a command

Don't be afraid to read what it says. The best way how to deal with an error message is to copy the text and search for it with Google. You'll be able to find details about it and steps how to solve it. Here are examples of error messages and what to do when they occur:

### Allowed memory size exhausted

```
PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 10924085 bytes) in ...
```

This can happen when the cache is being warmed up. It sais that Mautic needs more RAM to do it. It doesn't mean that your server hardware is rubbish. It means the Apache has the memory limit too low. Edit the `memory_limit` in the php.ini configuration file.

### A required PHP extension is missing

```
Fatal: Class 'ZipArchive' not found
```

This means that PHP cannot work with zip packages and it has to be installed first. Again, use Google to find solution.

## I need help

If you are stuck and need help, that's fine. We've all been there. Let's ask someone for help. If you are sure you've discovered a bug and want to report it to developers, create a new issue at [GitHub](https://github.com/mautic/mautic/issues "This link will take you to an external web site. We are not responsible for their content."). If you think your configuration is causing the problem, ask at the [forum](https://www.mautic.org/community/ "This link will take you to an external web site. We are not responsible for their content."). You can also chat with someone live in the [Slack chat](https://www.mautic.org/slack/ "This link will take you to an external web site. We are not responsible for their content.") In all cases, describe the problem well. Here is what you should describe to get the problem solved fast:

1. Steps to reproduce. Describe step by step tutorial how the problem can be reproduced.
2. PHP version.
3. Error messages. If you don't see the error message directly, search for it in the app/logs folder and in the server log. Server log can be find in different places. Ubuntu has it in /var/log/apache2/error.log file. Some web hostings provide an user interface to view the logs.

If you don't provide at least the above these information, the person who would like to help you will have to ask you for it. That’s a waste of your time and theirs. Also, please, be polite. Mautic is open source project and these people use their free time to help you.

 [ Next Post](https://johnlinhart.com/blog/google-bigquery-notes) [Previous Post ](https://johnlinhart.com/blog/wordpress-svn-commit-forbidden)

#### Projects I'm part of

 **[Mautic](http://mautic.org)** Open source marketing automation software.
 **[Calculoid.com](http://calculoid.com)** Web app which lets you create a calculator.
 **[eScope.cz](http://escope.cz/en)** My Joomla! articles and extensions.
 **[CRMery](http://crmery.com)** CRM as Joomla component.
 **[Constimator.com](http://constimator.com)** Web app which lets you calculate cost of building. 

#### For stalkers

 [](https://github.com/escopecz "GitHub") [](https://twitter.com/jan_linhart "Twitter") [](http://stackoverflow.com/users/2421302/escopecz "Stack Overflow") [](https://cz.linkedin.com/pub/jan-linhart/52/a03/80a "LinkedIn") [](http://magazine.joomla.org/component/k2/itemlist/user/5517-janlinhart "Joomla Magazine") 

#### Popular Tags

  [mautic](https://johnlinhart.com/tag:mautic) [developer](https://johnlinhart.com/tag:developer) [technology](https://johnlinhart.com/tag:technology) [web development](https://johnlinhart.com/tag:web%20development) [notes](https://johnlinhart.com/tag:notes) [composer](https://johnlinhart.com/tag:composer) [marketing](https://johnlinhart.com/tag:marketing) [personal](https://johnlinhart.com/tag:personal) [cronfig](https://johnlinhart.com/tag:cronfig) [hobby](https://johnlinhart.com/tag:hobby) [webexpo](https://johnlinhart.com/tag:webexpo) [freelance](https://johnlinhart.com/tag:freelance) [cost](https://johnlinhart.com/tag:cost) [calculator](https://johnlinhart.com/tag:calculator) [rate](https://johnlinhart.com/tag:rate) [calculoid](https://johnlinhart.com/tag:calculoid) [wordpress](https://johnlinhart.com/tag:wordpress) [grav](https://johnlinhart.com/tag:grav) [pagekit](https://johnlinhart.com/tag:pagekit) [cms](https://johnlinhart.com/tag:cms) [john](https://johnlinhart.com/tag:john) [name](https://johnlinhart.com/tag:name) 

#### Archives

- [ 1 November 2024  ](https://johnlinhart.com/blog/archives_month:nov_2024)
- [ 1 October 2024  ](https://johnlinhart.com/blog/archives_month:oct_2024)
- [ 5 March 2023  ](https://johnlinhart.com/blog/archives_month:mar_2023)
- [ 1 January 2020  ](https://johnlinhart.com/blog/archives_month:jan_2020)
- [ 2 December 2019  ](https://johnlinhart.com/blog/archives_month:dec_2019)
- [ 1 September 2019  ](https://johnlinhart.com/blog/archives_month:sep_2019)
- [ 1 August 2018  ](https://johnlinhart.com/blog/archives_month:aug_2018)
- [ 1 November 2016  ](https://johnlinhart.com/blog/archives_month:nov_2016)
- [ 1 September 2015  ](https://johnlinhart.com/blog/archives_month:sep_2015)
- [ 1 June 2015  ](https://johnlinhart.com/blog/archives_month:jun_2015)
- [ 1 May 2015  ](https://johnlinhart.com/blog/archives_month:may_2015)
- [ 1 April 2015  ](https://johnlinhart.com/blog/archives_month:apr_2015)

#### Syndicate

 [ Atom 1.0](https://johnlinhart.com/blog.atom) [ RSS](https://johnlinhart.com/blog.rss)

---

## Navigation

- Parent: [Blog](https://johnlinhart.com/index.md)
- Previous: [Google BigQuery Docs Digest](https://johnlinhart.com/blog/google-bigquery-notes.md)
- Next: [Wordpress SVN commit forbidden](https://johnlinhart.com/blog/wordpress-svn-commit-forbidden.md)
