fp7100
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Synology NAS & WordPress domain URLHello bcworkz,
Again, thanks for the reply and sorry for my delay.
Thank you for the tips.I didn’t know syno-misc.php isn’t common before (it just came when them package installed).
Below is the code inside. I didnt get any luck with any of them.
I feel like there must be other people that have run into the same issues, after installing from the synology pacakge?
I tried the following in syno-misc.php.
1) remove. "/wordpress/"from$home_path = $root_dir . "/wordpress/";
2) add/wordpressto$root_dir = '/var/services/web'I also tried the following in wp-config.php
1) removingrequire_once( ABSPATH . 'syno-misc.php' );Below is a copy of
syno-misc.php<?php class csSYNOWordPressMisc { static function get_home_path($home, $siteurl) { $root_dir = '/var/services/web'; if ( $home != '' && $home != $siteurl ) { $home_path = $root_dir . "/wordpress/"; } else { $home_path = ABSPATH; } return $home_path; } } ?>Also, enabled php errors, so now I can see more some more information.
Below is a capture of that i get when i go to example.com nowFatal error: Uncaught Error: Call to undefined function mysql_connect() in /volume1/web/wordpress/wp-includes/wp-db.php:1645 Stack trace: #0 /volume1/web/wordpress/wp-includes/wp-db.php(639): wpdb->db_connect() #1 /volume1/web/wordpress/wp-includes/load.php(427): wpdb->__construct('wordpress_user', 'passwordexample', 'wordpress', 'localhost:/run/...') #2 /volume1/web/wordpress/wp-settings.php(120): require_wp_db() #3 /volume1/web/wordpress/wp-config.php(107): require_once('/volume1/web/wo...') #4 /volume1/web/wordpress/wp-load.php(37): require_once('/volume1/web/wo...') #5 /volume1/web/wordpress/wp-blog-header.php(13): require_once('/volume1/web/wo...') #6 /volume1/web/wordpress/index.php(17): require('/volume1/web/wo...') #7 {main} thrown in /volume1/web/wordpress/wp-includes/wp-db.php on line 1645 The site is experiencing technical difficulties.Forum: Fixing WordPress
In reply to: Synology NAS & WordPress domain URLDear bcworkz. Thanks again for your reply.
example.co.uk naturally goes to the /web folder (via port 80) on my synology.
in /web the only sub-directory is /wordpress (i.e. there are .htaccess or wp-config.php files).
Are they required to be here also, even with a virtual host?
Below are code sections from htaccess or wp-config.php
Do you think the $pagaeURL is having any impact?To check, to remove /wordpress from my url (e.g. so i can access wordpress site directly from example.co.uk, not example.co.uk/wordpress), i need to have the following two things only:
1) virtual host points to web/wordpress
2) [via myphpadmin]
siteurl → http://example.co.uk
home → http://example.co.ukIn this case, i have already done this… so i’m quite confused.
Thanks again for your help, though!wp-config [snippet]
/* That's all, stop editing! Happy publishing. */ $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80" and $_SERVER["SERVER_PORT"] != "443") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"]; } else { $pageURL .= $_SERVER["SERVER_NAME"]; } if (!defined('SYNOWORDPRESS')) define('SYNOWORDPRESS', 'Synology Inc.'); /** Absolute path to the WordPress directory. */ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', dirname( __FILE__ ) . '/' ); } /** Sets up WordPress vars and included files. */ require_once( ABSPATH . 'wp-settings.php' ); require_once( ABSPATH . 'syno-misc.php' ); define( 'AUTOMATIC_UPDATER_DISABLED', true ); add_filter('pre_site_transient_update_core','__return_null');.htaccess
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPressForum: Fixing WordPress
In reply to: Synology NAS & WordPress domain URLDear bcworkz.
Thank you, again, for your quick reply.
Actually, I already tried changing these before initially posting, but with no luck so i had changed back to /wordpress.
I tried again:
1) go to example.co/wordpress/wp-admin/options-general.php
2) siteurl
http://example.co.uk/wordpress → http://example.co.uk/
home
http://example.co.uk/wordpress → http://example.co.uk/
‘save’ results in error [The site is experiencing technical difficulties.]. I guess this is because the home and siteurl now don’t match the actual location.
3) create virtual host to [example.co.uk]; document root [web/wordpress]
4) going to [example.co.uk] gives [The site is experiencing technical difficulties.]I checked on phpmyadmin that following step (2) /wordpress was removed. However, i didnt edit anything there.
Thanks for your help again. It’s very confusing for me.
Could it be something in the wp-config file hard-coded or something?
I used the default set-up from the synology package install.Kind regards,
FredForum: Fixing WordPress
In reply to: Synology NAS & WordPress domain URLDear bcworkz,
Thank you very much for your response.
I have followed your recommendation to test the virtual server. Having it running and going to example.com/license brings up the licence page no problem, so I think the virtual server is okay.
When i go to example.com (with virtual server set to web/wordpress) i get the following message:
“The site is experiencing technical difficulties.”
No other information comes up, unfortunately.
I can edit the wp_options from php-my-admin. Currently:
siteurl: http://example.co.uk/wordpress
home: http://example.co.uk/wordpressAny further recommendations are welcome. Thank you