XR webb Wordpress
Overview
WordPress site with plugins: Short domain xrsv.se to be used with Hosted on Miss Hosting: Code on self-hosted GitLab: Backup is done daily by Miss Hosting, can be restored via Helpdesk Development workflow
Develop and test locally on your own computer. Send merge request to colleague for review. Deploy to “your” staging/preview site (see “Uploading files / deploy Wordpress theme”). Merge to staging branch and deploy to When accepted, merge to main branch and deploy to live site. Setting up WordPress locally
(Instructions are for Mac, but MAMP works for Windows and it might be similar process for Windows too.)
Installing Wordpress
Start MAMP (not MAMP PRO) from your Applications folder. You can configure MAMP so it automatically starts/stops Apache/MySQL. Dashboard on http://localhost:8888/MAMP/
Create a new MySQL database called wordpress on (keep utf8 setting as is) Unzip to /Applications/MAMP/htdocs/wordpress (this is the default folder, you can ) Go to and create your new site Make sure to fill in database name wordpress Username and password are both rootm Create your WordPress admin user Manage your WordPress site on The WordPress site is now running on More info:
If you need multiple Wordpress installations on same machine, Tobias recommends instead of MAMP Development with MAMP
⚠️ Note: MAMP/Wordpress caches files, so to see your development changes, do a Hard Reload:
Troubleshooting (MAMP for Windows)
Fatal error: Uncaught Error: Class "IntlDateFormatter" not found in...
Reason:
This is due to a php internatinalization extension being excluded by default in MAMP distributions of wordpress.
Solution:
1 Turn off the running instnaces in MAMP with the “Stop servers” button
2 Confirm the version of php used in MAMP (MAMP → Preferences → Press “PHP”)
3 For the version you use, find the php.ini file e.g. open C:\MAMP\conf\php8.2.14\php.ini file and find the below line, then remove comment (;) at the start of it, i.e.:
;extension=php_intl.dll
=>
extension=php_intl.dll
4 Save the file
5 Restart the servers, then reload the workpress page, and the error should be gone.
Documentation:
Adding the custom XR theme
Clone the custom XR theme wp-theme () into /Applications/MAMP/htdocs/wordpress/wp-content/themes/wp-theme Activate the theme under Importing content from live WordPress site
Export Wordpress (Tools → Export): Import on localhost (Tools → Import): Select your own username on all missing usernames. Check the checkbox to download file attachments. Start import and wait until it says “All done. Have fun!”. Customize identity, main menu and home page
Click Customize in top bar Logo: search for ER-logo-White-Linear, skip cropping Tagline: Uppror för allt levande Then:
Go up on level, and find Menus Check the "Primary menu" checkbox: Then, go up on level, and find Homepage Settings Select Homepage = static page #1812 and Posts page = Nyheter Widgets
Make it look like on the production site...
Installing XR’s WordPress plug-ins
Active plug-ins:
Smart Slider 3 (slide shows on Home page etc) Slickr Flickr (photos on Press page, but currently disallowed) Easy Accordion (used for Kortfakta press) Matomo Analytics (site statistics) Active, less important:
Redirection (for page redirects) Phoenix Media Rename (simply rename your media files, once uploaded) WordPress Importer (for importing WP content) Inactive plug-ins:
Modern Events Calendar Lite Press page
Photos: Uses the Slickr Flickr plug-in: Once installed go te the plugin and copy configuration from production site.
Calendar/Events/“På Gång” page
Plugin: Advanced Custom Fields (ACF) for calendar, on For posts of type "Evenemang" 2 extra fields: event_date_start, event_date_end Stina: get local Wordpress up & running Tom: get ACF working locally Test Elin's latest commits, possibly push live Sort posts according to event start date remove old events automatically, only show future events Creating new staging/test environments
Press “Create a new domain” Uncheck “Share document root” Enter a domain e.g. mytest.extinctionrebellion.se – it will suggest to create this subfolder to the public_html folder "A" record to 185.76.65.55, 5 min Clone existing WordPress site into the new domain: Go to Wordpress Manager:
Press the arrow, the the "Staging" button Select the domain you just created above in the dropdown Disable Search Engine Visibility: check Database Name: it will suggest e.g. “wp59501” but you can give it a name that matches the name of your staging environment e.g. dev[username] Uploading files / deploy Wordpress theme
ZIP up the entire wp-theme folder of your updated theme Go to the folder for your Wordpress site, and the wp-content/themes folder (it has the wp-theme subfolder that you will overwrite) Databases
Domain management
Domains are handled in Njalla, not cPanel SEO search