Upgrade pages script